vrathore
unread,May 15, 2008, 2:14:56 AM5/15/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Delhi Flex User Group
We can make the AIR application work offline and synch with the
database.
We can use sqllite databse for the offline display of data.
sqllite is just like mysql but it would create a *.db file in ur
application folder
from where we can access the data.
A sample code for creating and executing the sqllite queries.
on creation complete we create a database contacts.
private function creationComplete():void
{
connection = new SQLConnection();
connection.open(File.applicationDirectory.resolvePath('contacts.db'));
var statement = new SQLStatement();
statement.text="CREATE TABLE IF NOT EXISTS contacts (ID INTEGER
PRIMARY KEY AUTOINCREMENT, action TEXT, inputXML TEXT, outputXML
TEXT)" ;
statement.sqlConnection=connection;
statement.execute();
var statement = new SQLStatement();
statement.text="CREATE TABLE IF NOT EXISTS offlineRequest (ID
INTEGER PRIMARY KEY AUTOINCREMENT, action TEXT, inputXML TEXT)" ;
statement.sqlConnection=connection;
statement.execute();
}
This is very fast and effective too.
Thanks and Regards
Varun Rathore
+9216868410