Tarek Said
Tarek Said

Reputation: 21

AIR sqlite asynchronous database connection?

function openDatabase():void
{
    var dbFile:File = File.applicationStorageDirectory.resolvePath("database.db");
    connection = new SQLConnection();
    connection.addEventListener(SQLEvent.OPEN, onOpen);
    connection.openAsync(dbFile, "create");
}

i used this code in AIR to create connection and it's working but where is the database file?? where is the applicationStorageDirectory??

Upvotes: 0

Views: 142

Answers (1)

Dan Hermann
Dan Hermann

Reputation: 1107

It's platform dependent (Mac, Windows, etc.). If you print out the value of "File.applicationStorageDirectory.nativePath", it will give you the fully-specified path on the filesystem of your current platform.

Upvotes: 1

Related Questions