PDA

View Full Version : SQL question


handycam
07-14-2007, 08:16 PM
I'm trying to access a local DB file using an Air app. I can successfully create the connection and connect; what I'm really stuck on is displaying the data from my request in a Data Grid.

Using this code I can see my records in the console, but how do I get it into a data grid? It doesn't seem to want to go into an ArrayColleciton.


function selectResult(event:SQLEvent):void
{
var result:SQLResult = selectStmt.getResult();
resultData = result;
var numRows:int = result.data.length;
for (var i:int = 0; i < numRows; i++)
{
var output:String = "";
for (var columnName:String in result.data[i])
{
output += columnName + ": " + result.data[i][columnName] + "; ";
}
trace("row[" + i.toString() + "]\t", output);
}
}