Adobe Air for iOS - SQLError: 'Error #3115' no such table
I am developing Adobe Air application for iOS with sqlite on it. When running on my local machine, it worked like charm (add, edit & delete). Unfortunately, when tried running on iPAD, it gives me the following error:
SQLError: 'Error #3115', details:'no such table: 'tblEmploye'', operation:'execute', detailID:'2013'
Here's my code when opening the sqlite database: ** data file is saved on the current application directory where all the files are stored:
exampleDBFile = File.documentsDirectory.resolvePath("mydb.db");
if (exampleDBFile==null || !exampleDBFile.exists) {
MovieClip(root).mcSong.visible = false;
MovieClip(root).mcAlert.visible = true;
MovieClip(root).mcAlert.enabled = true;
MovieClip(root).mcAlert.txtErrorMessage.text = "Database not found";
}
exampleDB = new SQLConnection();
exampleDB.addEventListener(SQLEvent.OPEN, onExampleDBOpened);
exampleDB.addEventListener(SQLErrorEvent.ERROR, onExampleDBError);
//exampleDB.openAsync(exampleDBFile);
exampleDB.open(exampleDBFile);
I also tried using the following but still no luck
exampleDBFile = File.applicationDirectory.resolvePath("mydb.db"); when using this, i receive a different error : Error:Error #3104
And heres the code for adding new entries
sqlInsert = "insert into tblLyrics (empName, empDesc) values
('"+ strReplace(txtSearchMe.text, "'", "") + "','"+ strReplace(txtContent.text,"'","") +"')";
dbStatement.text = sqlInsert;
dbStatement.addEventListener(SQLEvent.RESULT, onDBStatementInsertResult);
dbStatement.execute();
Hoping for your advice....