im having some problems trying to read a SQlite data base from flash using AS3.
The data base was created with this php script:
$db = new PDO('sqlite:abaco.sqlite');
$db->exec("CREATE TABLE 'abacodata' ('mod' varchar(25) NOT NULL,'name' varchar(25) NOT NULL,'pos' int(3) NOT NULL,'posx' int(11) NOT NULL,'posy' int(11) NOT NULL,'image' varchar(50) NOT NULL,'type' int(1) NOT NULL);");
$lines=file("TEMPDATA.txt");
foreach($lines as $v) {
$values = explode(',',$v);
$sql = "INSERT INTO abacodata VALUES ('".$values[0]."', '".$values[1]."', '".$values[2]."', '".$values[3]."', '".$values[4]."', '".$values[6]."', '".$values[5]."');";
$db->exec($sql);
}
As you can see, this creates a database like this:

After this i need to read this database in AS3, using this very simple script:
trace("INITIATED");
import flash.filesystem.File;
import flash.data.*;
var dbFile:File= File.applicationStorageDirectory.resolvePath("abaco.sqlite");
var sqlConn:SQLConnection = new SQLConnection();
var sqlStatement:SQLStatement = new SQLStatement();
sqlConn.open(dbFile);
sqlStatement.sqlConnection = sqlConn;
sqlStatement.text = "SELECT * FROM abacodata;";
sqlStatement.execute();
var result:Array = sqlStatement.getResult().data;
trace(result[0]['mod']);
The script achive to conect to the file, but it cant locate the table!;

Any one have any idea of what am i doing wrong? Thanks alot!
Can you see if you actually connected to the correct database file?
I’d check the 3 following things:
1- Does the file object point the correct file; you can check this by tracing nativePath:
2- Make sure that when you open that db, you open the existing db instead of creating a new one. Open your connection this way; if the db file doesn’t exist, you’ll get an error:
3- Finally, make sure your table exists by querying the sqlite_master table: