Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 在spark列表表单sqlite数据库中显示数据_Ios_Sqlite_Apache Flex_Flash Builder4.5 - Fatal编程技术网

Ios 在spark列表表单sqlite数据库中显示数据

Ios 在spark列表表单sqlite数据库中显示数据,ios,sqlite,apache-flex,flash-builder4.5,Ios,Sqlite,Apache Flex,Flash Builder4.5,在这里,我想在从sqlite数据库获取的列表中显示多个项目: protected function fetchfalseanswerquestion():void { sqlConnection = new SQLConnection(); sqlConnection.open(File.applicationStorageDirectory.resolvePath("SchoolSeries.db"));

在这里,我想在从sqlite数据库获取的列表中显示多个项目:

protected function fetchfalseanswerquestion():void
            {
                sqlConnection = new SQLConnection();
                sqlConnection.open(File.applicationStorageDirectory.resolvePath("SchoolSeries.db"));
                var stmt:SQLStatement = new SQLStatement();
                stmt.sqlConnection = sqlConnection;
                stmt.text = "select * from Schoolseries_Exam_Mode_User_Answers where Result = 'False'";
                stmt.execute();
                var result11:SQLResult = stmt.getResult();
                DataModel.getInstance().connection = sqlConnection;
                                    listquestion.visible = true;
                listquestion.dataProvider = new ArrayCollection(result11.data[0].data);
            }
在按钮上单击“我呼叫列表”功能:

protected function showrecord_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                fetchfalseanswerquestion();             
            }
从sqlite数据库获取数据的函数:

protected function fetchfalseanswerquestion():void
            {
                sqlConnection = new SQLConnection();
                sqlConnection.open(File.applicationStorageDirectory.resolvePath("SchoolSeries.db"));
                var stmt:SQLStatement = new SQLStatement();
                stmt.sqlConnection = sqlConnection;
                stmt.text = "select * from Schoolseries_Exam_Mode_User_Answers where Result = 'False'";
                stmt.execute();
                var result11:SQLResult = stmt.getResult();
                DataModel.getInstance().connection = sqlConnection;
                                    listquestion.visible = true;
                listquestion.dataProvider = new ArrayCollection(result11.data[0].data);
            }
这里是我的按钮控件和列表控件:

<s:Button id="showrecord" click="showrecord_clickHandler(event)">

</s:Button>

<s:List id="listquestion" visible="false" height="300" width="300" labelField="Fk_Question_Description">



</s:List>

但是,当我运行此程序时,不会出现错误,但不会显示任何内容


欢迎在代码中提供任何帮助/建议。

听起来您的ArrayCollection是空的。您确定SQL返回任何结果吗?在验证ArrayCollection不是空的之后,您应该确认从SQLite返回的数据中的每一行都有一个名为“Fk_Question_Description”的字段。完全无关:您可能需要考虑使用<代码> SqLo连接.OpenActhCy]()/代码>异步执行所有数据库操作,这样您的UI在执行查询时不会被锁定。