I encounter the same issue (with a Flex 3.5 SDK + AIR 2.0.2 SDK). And I still don't understand why. If you have found any solution or workaround, please share it. I am just starting my research on the net.
How are you creating your databases? Are you creating the db files at runtime, or are you copying over pre-populated databases? If you are copying over pre-populated databases, how are you initially creating those files?
I have the same problem. Does somebody have fix this or found a workaround?
Try This Way
var dbFile:File = File.applicationStorageDirectory.resolvePath("DBSample.db");
dbFile2 = File.applicationStorageDirectory.resolvePath("DBSample2.db");
selectStmt = new SQLStatement();
selectStmt.sqlConnection = conn;
var sql:String = "SELECT empId, firstName, lastName, salary FROM secondFile.customer";
selectStmt.text = sql;
Customer is the table in my secong db (dbfile2)
Try may solve ur problem
This works well excepted when one of the 2 db is encrypted.
You are right if one of the db is encrypted then it's not possbile
You may get the message like
details=attached databases must use the same text encoding as main database
And I would say more "this is the issue" !
It should be possible as it is clearly stated in the doc :
encryptionKey:ByteArray (default =
— The encryption key for the database file. If the
attach()call creates a database, the database is encrypted and the specified key is used as the encryption key for the database. If the call attaches an existing encrypted database, the value must match the database's encryption key or an error occurs. If the database being attached is not encrypted, or to create an unencrypted database, the value must be
so with a same encryptionkey, I (and this should be the same for FinalTarget) can open the encrypted db but not to attach it... quite strange.