In my AIR i created a sqlite db and now i want to retrieve a table value as string.
public function sqlInsert( title:String, read:String):void {
var sqlString:String = "INSERT INTO demo (no, title, read)" +
"VALUES (Null,'" + title + "','" + read +"')";
trace(sqlString);
_sqlStatement = new SQLStatement();
_sqlStatement.sqlConnection = _sqlConnection;
_sqlStatement.text = sqlString;
_sqlStatement.addEventListener(SQLEvent.RESULT, onResult);
_sqlStatement.addEventListener(SQLErrorEvent.ERROR, stmtErrorHandler);
_sqlStatement.execute();
}
Now i want this
public function getData():void{
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = _sqlConnection;
stmt.text = "SELECT title FROM demo WHERE read = 'R'";
//////// trace (title);
}
Help me to get the title value
Aucun commentaire:
Enregistrer un commentaire