AlexCasa
06-02-2008, 08:43 PM
Hello All,
I am using flex builder 3/AIR. In my app, I want the user to drag multiple files and have their file names sent to a sqlite database. Right now the code will send the first file and then shoot an error stating that I can't use the same sql connection while "execute" is true.
Error: Error #3110: Operation cannot be performed while SQLStatement.executing is true.
I think my problem is how to find out when a sql statement has completed successfully. Any Suggestions? Thank you
private function insertTrack(trackName:String):void
{
insertStmt2.text = "INSERT INTO track ( id , tname ) VALUES " +
"( null ,'" + trackName + "')";
insertStmt2.addEventListener(SQLEvent.RESULT, insertResult);
insertStmt2.addEventListener(SQLEvent.RESULT, errorHandler);
if (!(insertStmt2.execute())){
//Try sending tracks to database
insertStmt2.execute();
}
insertTrack(fileTrack);
}
I am using flex builder 3/AIR. In my app, I want the user to drag multiple files and have their file names sent to a sqlite database. Right now the code will send the first file and then shoot an error stating that I can't use the same sql connection while "execute" is true.
Error: Error #3110: Operation cannot be performed while SQLStatement.executing is true.
I think my problem is how to find out when a sql statement has completed successfully. Any Suggestions? Thank you
private function insertTrack(trackName:String):void
{
insertStmt2.text = "INSERT INTO track ( id , tname ) VALUES " +
"( null ,'" + trackName + "')";
insertStmt2.addEventListener(SQLEvent.RESULT, insertResult);
insertStmt2.addEventListener(SQLEvent.RESULT, errorHandler);
if (!(insertStmt2.execute())){
//Try sending tracks to database
insertStmt2.execute();
}
insertTrack(fileTrack);
}