开发者

Getting 'Error #3115: SQL Error.', details:'no such table:' Error when trying to execute SqlStatement

What I am trying to do is open a database in async mode and get some data from my database. To do I wrote this code down below:

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");

After, I wrote this code in openHandler method :

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();
        } 

My startstmt is a global SqlStatement variable. When I tested in Sqlite Manager it works fine this query but in adobe-air i am getting this error. Where did i do wrong and how can I solve this?


It all looks right. You should check you table name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜