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

时间:2013-08-02 11:35:06

标签: ios sqlite flex flash-builder4.5

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

按钮点击我调用列表功能:

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>

但是,当我运行这个时,我不会收到错误,但没有显示任何内容。

欢迎代码中的任何帮助/建议。

0 个答案:

没有答案