How to insert data from dynamic array to sqlite db getting from WebService Using Loop in action script 3.0 and flex

社会主义新天地 提交于 2019-12-02 08:21:28

My code was absolutely Right but a silly mistake done while calling the Database .
I just changed the call method

conn.openAsync(db); To conn.open(db); And it worked

    private function dbinit(event:Event):void
            {
                var dir:File = File.applicationDirectory;
                //
                var db:File = dir.resolvePath("dbImthePM.db");
                // after we set the file for our database we need to open it with our SQLConnection.

                conn.open(db);
/*              conn.openAsync(db); */ //Earlier It was Not letting me to reuse the sql statments
                //We set event listeners to check that the database is opened
                //The second event listener is to catch any processing errors
                //The last is handle the results from our queries since
                //Actionscript is an event based language.
                conn.addEventListener(SQLEvent.OPEN, dbLoaded);
                conn.addEventListener(SQLErrorEvent.ERROR, sqlError);
                conn.addEventListener(SQLEvent.RESULT, sqlResult);
            } 

Thanks to http://www.linkedin.com/in/tomvandeneynde

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!