• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Help with opening and reading a sqlite database

New Here ,
May 14, 2011 May 14, 2011

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?

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2013 Jan 18, 2013

Copy link to clipboard

Copied

LATEST

I would delete the database and compile again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines