Skip navigation
davidwaldrop
Currently Being Moderated

Help with opening and reading a sqlite database

May 14, 2011 2:16 PM

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?

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points