我正在尝试做的是在异步模式下打开一个数据库,并从我的数据库中获取一些数据。为此,我写下了下面的代码:
var file:File = File.applicationStorageDirectory.resolvePath("data/mydatabase.db");
sqlConnection = new SQLConnection();
sqlConnection.addEventListener(SQLEvent.OPEN, openHandler);
sqlConnection.addEventListener(SQLErrorEvent.ERROR, errorHandler);
sqlConnection.openAsync(file,"read");之后,我用openHandler方法编写了以下代码:
protected function openHandler(event:SQLEvent):void
{
Alert.show("Database opened successfully");
startstmt = new SQLStatement();
startstmt.sqlConnection = sqlConnection;
startstmt.text = "SELECT tid FROM sectionstable WHERE farma LIKE '%heim%' OR indication LIKE '%heim%' LIMIT 0,10";
startstmt.execute();
} 我的startstmt是一个全局SqlStatement变量。当我在Sqlite Manager中测试时,它可以很好地执行这个查询,但是在adobe-air中,我得到了这个错误。我哪里做错了?我该如何解决这个问题?
发布于 2011-04-28 20:07:52
一切看起来都是对的。您应该检查您的表名。
https://stackoverflow.com/questions/5815267
复制相似问题