Hello,
I am working on an AIR application that uses an SQLite database. Everything has been going smooth except:
When I execute a query on an empty table, such as "SELECT * FROM users" when `users` is still an empty table (first launch) I don't get an event for SQLEvent.RESULT or SQLErrorEvent.ERROR, how can I listen for a response to a query that returns empty? I am trying to determine if the user has set an account, and if not, prompt them to on first launch.
Code:
protected function query(queryStr:String):SQLStatement
{
var sqlStatement:SQLStatement = new SQLStatement();
sqlStatement.addEventListener(SQLEvent.RESULT, handleQueryResult);
sqlStatement.addEventListener(SQLErrorEvent.ERROR,handleSQLError);
sqlStatement.sqlConnection = sqlConnection;
sqlStatement.text = queryStr;
sqlStatement.execute();
return sqlStatement;
}
thanks in advance