Sqlite 如何检索数据库中的数据并将其输出到flash中的动态文本框中?

Sqlite 如何检索数据库中的数据并将其输出到flash中的动态文本框中?,sqlite,flash,Sqlite,Flash,我已经可以从sqlite数据库中检索数据以在flash中列出组件,但我想检索数据并将其放入动态文本框中。 这是我插入数据的代码 b_new.addEventListener(MouseEvent.CLICK, createNew); function createNew(MouseEvent):void { if(fname.text !="") { var stat:SQLStatement = new SQLStatement(); stat

我已经可以从sqlite数据库中检索数据以在flash中列出组件,但我想检索数据并将其放入动态文本框中。 这是我插入数据的代码

b_new.addEventListener(MouseEvent.CLICK, createNew);

function createNew(MouseEvent):void
{
    if(fname.text !="")
    {
        var stat:SQLStatement = new SQLStatement();
        stat.sqlConnection = connection;
        stat.text = "INSERT INTO user (fname, dateplayed, timein) VALUES (@fname, @dateplayed, @timein)";
        stat.parameters["@fname"] = fname.text;
        stat.parameters["@dateplayed"] = dateplayed.text;
        stat.parameters["@timein"] = timein.text;
        stat.execute(-1, new Responder(selectItems));
        fname.text = dateplayed.text = timein.text = "";
        nulll.text = "";
    }
    else
        nulll.text = "Enter Username!!!"

}
下面是如何检索它并将其放入列表组件中

function selectItems(SQLEvent):void
{
    b_save.enabled = false;
    b_delete.enabled = false;
    var stat:SQLStatement = new SQLStatement();
    stat.sqlConnection = connection;
    stat.text = "SELECT idd, fname, dateplayed, timein FROM user ORDER BY idd";
    stat.execute(-1, new Responder(onSelected));
}

function onSelected(evt:SQLResult):void
{
    if (evt.data != null)
    {
        itemList.dataProvider = new DataProvider();
        for (var i:int=0; i<evt.data.length; i++)
        {
            itemList.addItem({label:(evt.data[i].fname + " " + evt.data[i].dateplayed  + " " + evt.data[i].timein), data:evt.data[i]});
        }
    }
}
我能做些什么来纠正它吗?希望你能帮助我。提前谢谢

function selectItems(SQLEvent):void
{
    var stat:SQLStatement = new SQLStatement();
    stat.sqlConnection = connection;
    stat.text = "SELECT idd, fname, dateplayed, timein FROM user ORDER BY idd";
    //i know this is not the right syntax but this is my algorithm i guess
    do while{
    .read
    name.text = .item(1)
    //something like this
    }
}