Actionscript 3 :: Prevent Air For Android SQLite Database From Being Overwritten?

Feb 14, 2012

Im creating an sqlite db in my air for android app inside the following function:[code]i can successfully create tables, insert and select, but each time i re-publish the app from flash cs5.5 the database is overwritten and all data is lost. Totally stumped, any ideas welcome!i'm publishing a debug release directly from flash pro via usb. When the app is initialised it calls the method above, on receiving the OPEN event it creates a table using the following SQL statement.[code]I can then run some operations, insert, select etc and everything is as expected. If i exit and re-luanch the app, the previous data sets are intact, but when i re-publish from flash any data stored from the previous release has disappeared.According to the documentation SQLConnection.open() will open a connection to the file supplied in the parameters and if it doesn't exist, it will create one...

View 2 Replies


Similar Posts:


Flex :: Get Local SQLite Database In Sync With Live Server Database?

Dec 17, 2009

I want to create a Flex 3 application running in Adobe Air that accesses an SQLite database and I need to keep this database in sync with an SQL server 2005 database running a website.Is this something that Flex supports or is it going to be a custom script? Also, has anybody done anything like this?

Edit: The synchronisation can be done on a daily basis rather than real time. The data will be read only from a front end perspective with a CMS to do updates on the website.

View 2 Replies

ActionScript 3.0 :: Use A Sqlite Database?

Nov 9, 2010

I am wanting to try to use a sqlite database in my project.I have downloaded several sqlite managers from the internet and they all save the database with a sqlite extension.However I see in flash we use the db extension (is this correct?);How can I use the databases I create if they all save with a sqlite extension?

View 4 Replies

Flex :: Web App Access A Sqlite Database?

Nov 16, 2010

I'm making an application (web based) using flex and i have a requirment to access the SQLite database on the local system. There is no server running and i've decided to give them the link to the html file and see how that works out.

So in the root directory, there will be all required swf, html files, etc and a .db file. Can i access that database thro the flex web application ?

View 2 Replies

Flex :: Querying SQLite Database With AIR App

Dec 13, 2010

I have been struggling with trying to interface with SQLite and Adobe AIR. I am using the Flex 4 SDK with AIR 2.0. I modified code from a tutorial by David Tucker on InsideRIA ([URL]). I am writing in FlashDevelop (which I suppose could be my problem), and I can compile and run the app. The issue is that when I go to search the db file, I always get some error which results in the 'BREAKER' trace (ie - the 'queryError' function is called). I have tried simply running the SQL command on the db and it works fine, so there is an issue somewhere in the way Flex or AIR is handling my query (or obviously I could have made a mistake in coding).

[Code]....

View 1 Replies

ActionScript 3.0 :: Connecting To A SQLite Database?

Aug 30, 2010

I'm developing a desktop application in Flash, but I can't seem to find any tutorials that aren't based on FLEX to connect my application to a database file.

Do I have to write my application in FLEX to use SQLite or can I create an AIR app in Flash and still use it?

View 0 Replies

Database :: Sqlite And Flex - Insert Into If Not Exists?

Feb 4, 2010

I'm using flex to develop my first desktop app and I'm working with sqlite for the first time as well. I'm creating my database and all the tables and I would also like to add a few rows of data into a couple of the tables so that the users have some data to work with on first install.

The only problem I'm having is every time I run the program it keeps inserting the same data over and over again. I'm just wondering if its possible to do a - INSERT INTO IF NOT EXISTS. or some other kind of work around.

View 2 Replies

Flex 4 :: Create An Encrypted SQLite Database

Aug 26, 2010

How can I create and use an encrypted SQLite database for an AIR application, please?

View 1 Replies

Local Internal Database In Flash And SQLite

Jan 12, 2011

I need to store a large amount of data that will be internally accessed often within a flash file. The database is temporary and does not need to be stored in an external file. Is it possible to use SQLite to create a database that may be used internally in flash? As far as access speeds are concerned, is this an efficient solution?

View 1 Replies

Flex :: Improve The Performance Of The SQLite Database?

Apr 26, 2011

Background: I am using SQLite database in my flex application. Size of the database is 4 MB and have 5 tables which are

table 1 have 2500 records
table 2 have 8700 records
table 3 have 3000 records
table 4 have 5000 records
table 5 have 2000 records.

Problem: Whenever I run a select query on any table, it takes around (approx 50 seconds) to fetch data from database tables. This has made the application quite slow and unresponsive while it fetches the data from the table.

How can i improve the performance of the SQLite database so that the time taken to fetch the data from the tables is reduced?

View 3 Replies

Database :: Embed A SQLite DB (*.db File) To The AIR Application?

Jan 14, 2012

I want to emded SQLite database (*.db file) to the AIR app, like images, mp3 etc.This is to ensure that it was impossible to copy my database for other users.

View 2 Replies

Actionscript 3 :: Insert A Variable Into SQLite Database?

Feb 2, 2012

I have a function that inserts data into a SQLite database. I can manually add data using

sqlStatement.text = "INSERT INTO users (First_Name, Last_Name) VALUES ('John', 'Doe')";

This works perfectly. Now I am trying to insert the data from a variable instead. I can trace my variable from this function- trace(Main._firstName); //returns John, but when I insert it using this:

sqlStatement.text = "INSERT INTO users (First_Name, Last_Name) VALUES (" + Main._firstName + ", 'Doe')";

it inserts it as "null Doe".

View 1 Replies

Flex :: Getting Next Record In SQLite Database For Mobile Application?

Feb 27, 2011

I have a mobile application that uses an sqlite database. I cannot seem to figure out how to access the next record when the user presses the 'next' button. My database is using 'id' as primary key with autoincrement as integer.

private function nextMoveRPart(event:EffectEvent):void
{
var cardNumber:int = parseInt(cardNumberLabel.text);

[Code].....

View 1 Replies

Flash :: Mysql Application With Local Database (not Sqlite - Not Air)

Jan 10, 2012

I would like to have a Flash Application (not air) to connect to a local database. Air is not only getting unsupported by Adobe in LINUX but besides, it has serious problems and miss implementation with SQLite. So we want to connect to a local MySQL database. This application should be simple, so we do not want to also have an unnecessary web server (also local) to make a middle communication between the flash app and the MySQL server. There is this driver that allow to communicate Flash with MySQL [URL] Question is: Would it be any problem using this approach when installing the whole application to each client? (because we also in the installation should install a MySQL server).

View 1 Replies

Actionscript 3 :: Open A Remote Sqlite Database Over Http?

Apr 2, 2012

Is it possible to open an sqlite file over http? I only need to read the db, and was hoping I could do something like:

var dbFile:File = new File("http://10.1.1.50/project/db.sqlite");
sqlConnection.open(dbFile);

Error #3125: Unable to open the database file.', details:'Connection closed.', operation:'open', detailID:'1001'

My situation calls for several apps compiled for various devices to share this file, which is served locally via wamp.

View 1 Replies

Flex SQLite Optimization: Adding Database Name In Front Of Tables?

Sep 18, 2011

This article on Livedocs says you should add the database name in front of tables.[URL]..My question is, should I do that everywhere where a table name appears or only once?In this query: select T1.col,T2.col from T1 left join T2 on T1.id=T2.id order by T2.order;

Should I add main.T1 and main.T2 everywhere or just after for, the first time: select T1.col,T2.col from main.T1 left join main.T2 on T1.id=T2.id order by T2.order;

View 1 Replies

Flash :: #3115 Error When Retrieving Data From SQLite Database

Oct 4, 2011

I have this little piece of code to retrieve data from a local SQLite database (to an AIR app):

import flash.filesystem.File;
import flash.data.SQLConnection;
import flash.data.SQLStatement;

[Code]....

It is only a "proof of concept" piece of code and it "lives" in the first frame of the timeline of the Flash IDE. What happens? When I compile my SWF (AIR for iPhone), I get this error:

SQLError: 'Error #3115: SQL Error.', details:'no such table: 'background'', operation:'execute', detailID:'2013'

I created a basic db with a Firefox extension (SQLiteManager). What can cause this error? The table exists!

View 1 Replies

ActionScript 3.0 :: Save The Path Of The Chosen File In Sqlite Database?

Jun 24, 2010

I m trying a make a database on sqlite using actionscript3 and flex.I can browse through file and select a file using browseForOpen().I can get the url by Filename.url and storing it into a string type variable fileUrl:String.I m creating table like:

CREATE TABLE IF NOT EXISTS test_table (id INTEGER PRIMARY KEY AUTOINCREMENT,user_name TEXT,password TEXT ,fileurl TEXT)

i made a text input form for entering user_name and password like:

<mx:TextInput x="50" y="10" width="117" id="user_name"/>
<mx:TextInput x="50" y="10" width="117" id="password"/>

Now i want to insert values into the table like:

sqls.text = "INSERT INTO testt_table (user_name, password,fileurl) VALUES('"+user_name.text+"','"+password.text+"',fi leUrl);";

but its giving errors.How can I enter the url or path of the file chosen into the table.

View 0 Replies

Android :: Prevent Flash Player Fault In WebView?

May 31, 2011

I'm loading .swf files into a WebView directly using webView.loadUrl("http:url....);. It works perfectly in the vast majority of cases.When loading a few specific swf files on certain devices, though, shortly after the Flash media begins to be displayed, my app closes with a Signal 11 fault caused by the Flash Player plugin. Example LogCat dump here. No Exception is thrown. The same thing happens if I load those files into the xScope browser.When loading them into Dolphin Browser or the default Android Browser, however, shortly after the media begins to be displayed, the following is printed to LogCat:

05-31 18:13:15.498: DEBUG/FONT(9183): WARNING: **************************** Detect FLEngine error 1 ****************************
05-31 18:13:15.558: DEBUG/(9183): ---------------------------------------------------------------> call AudioTrack stop()

and an error icon is displayed on-screen: No SIGSEGV fault occurs, and the browser is not terminated.how I could do the exact same thing? Prevent the Flash Player plugin from causing the SIGSEGV fault, and simply handle the error myself, without the app being terminated?

View 1 Replies

Flash :: Prevent Android From Sleeping While The Flashplayer Is Running

Oct 14, 2011

I've written a videoplayer for Android based on Flash (10.2) which plays videostreams. In some cases (*), the player begins to buffer for quite some time. Now, while the player is acually playing the stream, Flash (somehow) signals the OS to prevent entering the sleep-mode. But while buffering, this is not the case and the phone will eventually enter sleep mode before the stream has restarted. So the user has to unlock the phone again - not very convenient. Is there a way to set a signal with Flash/AS3 to prevent the Andoid-phone to go into sleep mode? (*) mostly over the mobile network when the network access performes a handover between 3G and 2G or vice versa

View 1 Replies

Actionscript 3 :: Prevent Screen Timeout With Adobe AIR For Mobile On Android And IOS?

Jul 23, 2011

I have a pure AS3 app that I'm deploying to both Android and iOS. In some cases I need the screen to not turn off for 60+ seconds. Is there a way to do this with AIR for mobile?

View 1 Replies

App Descriptor File Keeps Getting Overwritten

Jul 19, 2011

I've been tasked with building an AIR for iOS application.Everything is going pretty smooth, there's just one thing I can't seem to get right.I need to make some changes to the application descriptor xml(<key>UIApplicationExitsOnSuspend</key><true/> so the application will exit properly i/o suspending)... easy right? Problem is: every time I press 'publish', flash overwrites my xml and packages the ipa file with it's own xml.

View 2 Replies

Android :: "unable To Open The Database File" Error In Flex

Nov 1, 2011

Using Flex 4.5 for Android development, this is the script that should create the database:

private var db:File = File.userDirectory.resolvePath("events.db");
private var conn:SQLConnection;
public function MyDB() {
conn = new SQLConnection();

[Code]...

View 1 Replies

ActionScript 2.0 :: Classes In A Precomplied Swf Being Overwritten When Loaded Into A Swf

Feb 3, 2009

I've a main swf thats loading a sub swf... simple

The sub swf has imported its own .as file to run some code.

The main movie also has its own .as file it has imported to run some code

See where I'm goin... ?

Problem is the .as files are in different folders, named the same name but have different code

When you load the sub swf into the main swf it tries to run the main swf .as file!

Anyone any solutions apart from the obvoius of renaming the files? At this moment this is not an option.

See my attached zip for sample files

View 3 Replies

ActionScript 2.0 :: F8: Objects Returned From Class Being Overwritten?

May 5, 2007

I have four movieclips on the stage. They can be dragged around. I have a class that creates a segment from two points, and returns the x-intercept, y-intercept, slope, and inverse slope of a linear function going through the two points.On every enterFrame() i create one segment for each pair of points, then the information is displayed in a bunch of dynamic text boxes.

The Problem: whichever object is sent over last overwrites the data from the first. I am creating two different objects with different names, but the first is being overwritten by the second. What is going wrong here?

FLA included. But you will need to make this class file:

Seg.as:

Code:
import flash.geom.Point;
class Seg {
// variables
private var p1:Point;

[code]....

View 2 Replies

Android :: Flex - Pack Database File Within The .apk File?

Mar 11, 2012

I wrote a mobile application ( AIR ) which storing some strings into a SqlLite database.It is external database file, which shall reside in a sub folder of the main application folder.So far everything works flawless while debugging on the PC, but when i am exporting the application into .APK file the result package does not contain the database, neither the database folder.

View 1 Replies

ActionScript 3.0 :: Two Child Swf's With Same Document Class - Constructor Gets Overwritten - Flash Bug?

Jul 22, 2009

here is the scenario we ran across while working on our Flash AS3 project today.

/main/root.fla
/main/root.as
/main/sub1/sub.fla

[code]....

We have many sub swf's that are loaded by the main root swf. The root swf shows the art on the stage of the sub swf, and also runs some code from the sub swf's document class. However, we noticed the constructor was not getting called on the second sub swf if the document class is the same name- even if they are in different folders. Note that we publish our swf files to a separate directory (with the same structure as above) so it is easily copied to the web server.

-root.swf loads sub1/sub.swf
-the constructor of the document class sub.as in subfolder sub1 gets called
-root.swf shows sub1/sub.swf assets with the correctly constructed sub1/sub.as document class
-user chooses to switch to sub2

[code]...

We decided to use a workaround where we basically changed the two document class .as files to be different names (e.g. renamed sub1/sub.as -> sub1/sub1.as and sub2/sub.as -> sub2/sub2.as, and updated the .fla's to point to the renamed document classes), and it works as expected. Hopefully that workaround is useful for someone.I realize most people just name every single file differently and keep everything in one folder, but when you have a sufficiently complicated project, things like this come up.

View 2 Replies

IDE :: Make A Flash Movie Display Text That Is In The Sql Database And A Php Script To Change The Database?

Jul 15, 2009

i want to intertwine php, MySql and flash. so i can make a flash movie display text that is in the sql database and a php script to change the database, php > sql = i can do but sql > flash = i can't do..i want it so the sql data show's in a text box in the flash movie...

View 1 Replies

Php :: FLEX Database Will Not Refresh After Updating Database Unless Browser Is Restarted?

Jun 7, 2010

I have researched this issue all over and most people say use the .refresh() method to update a datagrid after updating or adding a new record. This does not do anything. So, my issue is this. I have a mySQL database hosted I am connecting via PHP, I have 1 mxml file and 2 php files (I know I can use just 1 but I am learning and this was easier for me to use for troubleshooting). The issue is no matter what I change on the datagrid the update does not show on the datagrid unless I close out of IE and reopen it. I can refresh or open the page in another window and the update does not show. I have to exit entirely and restart in order for any updates or additions to show.Here is my licenseTracker.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code]....

View 9 Replies

Database :: Save A Form To The Database Without Knowing The Field Type?

Jun 17, 2010

I am working on a function to generate a form at runtime in Flex based on a call to the DB. The call to the DB returns the field types, id, tooltips etc as an arraycollection, the arraycollection is then parsed in order to ascertain what control to display based on the type field in the array - this bit works fine.However, i am stuck on trying to save the form fields back to the database using a CFC.my form rendering code is as follows but how do i save values entered back to the database? rendering code..

[Bindable]
public var getglobalprofileb:ArrayCollection;
public function init(event:ResultEvent):void {[code].......

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved