Here, I wanna display multiple items in list fetched from sqlite database:
On-button click I call list function:
protected function showrecord_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
fetchfalseanswerquestion();
}
Function to fetch data from sqlite database:
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);
}
Here, are my button control and list control:
<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>
But, when I run this I don't t get errors but no content has been displayed.
Any help/suggestion in code are welcome.