I am writing an app that parses a csv file to an array and then insert the array into a sqlite database. I am having issues with Async connection to the sqlite database, I get a 3106 error...... I think the problem is that it executes the next statement before the previous is finished but I can't find a way to deal with this. Any help would be greatly appreciated.

_updateStmt.sqlConnection = _conn;
_updateStmt.text = "UPDATE main.myTable SET statusF=@STATUS WHERE keyId=@ID";
_conn.begin();//_conn is a SQLConnection, I didn't take the time to write the code for it, but this is where the magic happens
for (var i:uint = 0; i < currentArray.length; i++){
_updateStmt.parameters["@STATUS"] = currentArray[i].status;
_updateStmt.parameters["@ID"] = currentArray[i].id;
_updateStmt.execute();
}
_conn.commit();

Also have a look at the adobe flex livedocs chapter 'Improving database performance'