0
我真的對flex非常新,現在我在嘗試學習將我的應用程序前端連接到數據庫時遇到此錯誤。 錯誤:1067:將數組類型值的隱式強制轉換爲不相關的類型mx.collections:IList。1067:將數組類型的值隱式強制爲無關類型mx.collections:IList
private function onDatabaseOpen(event:SQLEvent):void
{
// init sqlStatement object
sqlStmt = new SQLStatement();
sqlStmt.sqlConnection = conn;
var sql:String = "CREATE TABLE IF NOT EXISTS user (" +
" id INTEGER PRIMARY KEY AUTOINCREMENT, " +
" password TEXT" +
")";
sqlStmt.text = sql;
sqlStmt.addEventListener(SQLEvent.RESULT, statResult);
sqlStmt.addEventListener(SQLErrorEvent.ERROR, createError);
sqlStmt.execute();
}
private function statResult(event:SQLEvent):void
{
// refresh data
var sqlresult:SQLResult = sqlStmt.getResult();
if(sqlresult.data == null)
{
getResult();
return;
}
datafiled.dataProvider = sqlresult.data;
}