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


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

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

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 :: 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

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

Database :: Approach Local Database Management Via Flex/Air App?

Jan 17, 2011

I am planning on using Flash Builder 4/Flex to write an AIR application which is primarily based around recording, storing and analyzing data.I'll be creating charts etc that need to update in almost real time.It's essential to me that the application be able to function without an internet connection so I need a local database of some variety,but I would also eventually like to build in online synchronization of the data where either database can be update each other based on newer information. Moreover, some type of encryption would definitely be welcome, and speed is a large concern

Synchronization: Primarily updates/additions/deletions will be done on the offline database, but ideally I want to have a web interface that will allow the same updates/additions/deletions and will be synced (beyond that I'm not sure exactly how to do it as I can model that based on what is most achievable).I'm wondering if there's any prebuilt engine that could handle the synchronization of 2 databases. I may end up having the web interface only be for additions, which would be significantly easier to sync.. and I may start that way, but i want to build with technologies that will best allow me to implement full online crud at some point.

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

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

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 Local SQLite BLOB Display?

Jul 29, 2011

I've got 3 columns in an SQLite db I built with Firefox's handy SQLite Manager. So, I created 3 columns, an index/reference that's just an incrementing INTEGER for easy reference, a descriptive title of the image (so it can be searchable later) in a TEXT, and a BLOB type that holds the pngs.

I'm trying to add this in an assets folder into my project (as a pre-populated database) and display the blob images, one at a time, in a window one after the other, scrollable by user. This is where I'm running into problems. Eventually I want to be able to encrypt it and add a search tool, but first things first, and that's displaying an image.

I have spent several hours scouring the web about this topic, but there isn't much help out there: Adobe has tips about using SQLite with AS3 (their reference documents and the support section of their website have some overview articles) but nothing refers to reading blob data in depth.

On this site, I've found some references to Adobe Air looking for extra byte information when reading blobs since they have a different syntax to write to the databases created within the program. See: What is the first bytes in a Blob column SQlite Adobe AIR? Blob Sizeinfo?

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

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

Flex :: Saving And Loading Image To Local SQLite BLOB ?

Sep 8, 2011

I need to be able to save and load images into an SQLite database using Flex 4.5 for a mobile application. The use case is this:

Inside the view there is a spark Image object with a URL as a source

When user clicks button, the Image is saved to an SQLite db inside a BLOB field.

In a separate Image, the source is set to the ByteArray stored in the db.

The biggest question so far is this: where do I get the ByteArray for a loaded Image? I've tried debugging and inspecting Image, BitmapImage, and BitMapData but there's no sign of the byte array.... perhaps it's inside the ContentLoader? But that's null unless I enable caching.

I've done some research and there are no complete examples for how to handle this. I've written a simple View that anyone can copy and paste into a new project. It will compile without errors and can be used for testing. I will update this code as I get the answers I need so that anyone can have a fully working example of this workflow.The only caveat: I used a synchronous connection to the DB to avoid complicating the code with event handlers, I wanted to keep it as simple as possible.I will only mark this question as answered once it is fully functioning both ways.

UPDATE SEPT. 09 2011: The code below is now fully functioning in both directions (save and load). Here are some of the things I've learned: It turns out that the ByteArray of a spark Image can be found inside the LoaderInfo of the image itself. Like this:

image.loaderInfo.bytes

However, trying to set this ByteArray as the source of another image ( image2.source = image1.loaderInfo.bytes) results in this security error: Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.Which is too bad because it would save so much time and processing power.the workaround is to encode the ByteArray using either a JPEGEncoder or a PNGEncoder. I used the JPEGEncoder which produces much smaller files. Here's how:

var encoder:JPEGEncoder = new JPEGEncoder(75);
var imageByteArray:ByteArray = encoder.encode(imageToSave.bitmapData);

Now the problem is saving these bytes to the DB. Saving them as they are now will not work once we read them out, I'm not sure why. So the solution is to encode them into a base64 string like this:

var baseEncoder:Base64Encoder = new Base64Encoder();
baseEncoder.encodeBytes(imageByteArray);
var encodedBytes:String = baseEncoder.toString();

So now just save that string into the BLOB field and later read it out. However, you have to decode it from a base64 string to a ByteArray like this:

var encodedBytes:String = result.data[0].imagedata;
var baseDecoder:Base64Decoder = new Base64Decoder();
baseDecoder.decode(encodedBytes);
var byteArray:ByteArray = baseDecoder.toByteArray();

Now assign the bytearray as the source of your image and you're done. Simple right?if you find any optimizations or alternative ways to do this.I will respond and keep this code updated if need be.

View 2 Replies

Actionscript 2.0 :: Connect Flash To Local Sql Database Without The Server?

Jan 15, 2009

But this website is simply superb. I want to how to connect flash to local sql database without the server side scripting.

View 3 Replies

ActionScript 3.0 :: Create A Local Database?

Mar 21, 2011

Id like to know if theres any way, to create a local database, with actionscript, php and mysql.And communicate with the database, like inserting data to the database, and selecting data from the database,I mean,if actionscript is able to communicate with the local database through php and mysql.

View 3 Replies

Adding Data To Local Mysql Database Using Php

Aug 30, 2010

I'm making a login script and adding the data to my local mysql database using php.it works as long as I browse in my browser to localhost/ flash/ movie.swf but if I just open the folder and run the .swf file it doesnt work

View 2 Replies

Connect Local Database From Internet Browser?

Jun 29, 2011

I need to find a way to develop a program which can run local and server side. I don't know silverlight/flash or something else can do it.Is there any framework/language/platform which can work over internet when internet connection exists and can work when internet went off?

View 1 Replies

ActionScript 3.0 :: Create Connection With SQL Lite Local Database (AIR)?

Jan 4, 2012

I have got Flash CS5 and i create AIR desktop application. I would like to create and edit sql lite local air database. I know i should use SQLStatement and sqlConnection. Could someone give me any advice about doing that. Maybe some tutorial or something what let me to do that.

I don`t know should i create that database sql lite file earlier and include it to air project or should i create that database in dynamic way by as3? How can i get and edit data from this database? How can i save that local database if it included in air project (i would like to that database file would be inside of air project)?

View 4 Replies

Flex 3:: Connect To A MS Access 2007 Local Database

Nov 14, 2011

How do I connect Flex3 to a MS Access 2007 local database? Could you provide some example code for a login page using username and password and validating it?

View 2 Replies

ActionScript 2.0 :: Database - Make A Local Connection To The XML File

Jan 4, 2008

I want to make an offline desktop app. that stores my company's customers and their data in an XML file, just like a database. so that I'm able to load, edit (create new customers, add to their data) and save it into the XML file which is stored locally. i then want to make a Local Connection to the XML file somehow, so that others in the company can do the same from their PC.. Can anybody tell me if this is possible at all? (making a flash app that writes XML files to any location on a PC that only has network.. edit XML files through Local connection function in flash).

View 3 Replies

Flash :: Access Local Access Database From It (or AIR)?

Nov 13, 2009

Is it possible for Flash or possibly Adobe AIR to have access to a local Access database?

I will have either a Flash EXE or AIR application running on a local PC (WinXP). The PC will also have a local Access database. I need my Flash application to get the data from this Access database. How would I do this?

I doubt it can be done with Flash or AIR alone (someone prove me wrong or right), but is there an option for some middle-man application to access the data base and send it on to Flash? How would this work?

Or could I read the MDB file into Flash and parse it myself? is there a library for this?

View 2 Replies

Flex - Security Restriction - Save The Results Of A Database Query To A Local File?

Jan 2, 2012

I'm having some trouble getting around a security restriction of flex. Saving a file is apparently an action that can only be invoked upon user interaction. The problem is that after my user clicks on the save button, I need to perform a database query to get the data for the file I want to save.

Because Flex works asynchronous, I have to make the database call and then catch the ResultEvent in a different function. In that function, I no longer have the user's mouseclick event. How am I then supposed to save this file?

[Code]...

View 1 Replies







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