Copy link to clipboard
Copied
I have spent the last 2 days trying to simply read a sqlite database. I am now getting an error: SQLError: 'Error #3138: File opened is not a database file.', details:'', operation:'open'.
The database is there, I have checked the nativepath and am sure the app is pointing to the right place. I am also surethe database is a sqlite database as I can iope it and browse with SqliteStudio.
Here is the code I am using to test with:
var db:File = File.applicationStorageDirectory.resolvePath("roam.db");
sqlc.open(db, SQLMode.READ);
sqls.text = "SELECT * FROM feed"
sqls.execute();
var data:Array = sqls.getResult().data;
//we pass the array of objects to our data provider to fill the datagrid
dp = new ArrayCollection(data);
The error occurs on the sqlcopen command. I have tried varoious parameters for the SQLMode. IN fact I have nothing left to try. ANyone have an y suggestions?
Copy link to clipboard
Copied
I would delete the database and compile again.