UtilSet.LBAP.DeleteAllRows
db= New REALSQLdatabase
dbFile = GetFolderItem("mcj.rsd")
db.DatabaseFile=dbFile
If db.Connect() then
rs = db.SQLSelect("select *,ROWID from people")
While Not rs.eof
UtilSet.LBAP.AddRow rs.IdxField(3).StringValue
UtilSet.LBAP.Cell(UtilSet.LBAP.LastIndex, 1)=rs.IdxField(2).StringValue
UtilSet.LBAP.Cell(UtilSet.LBAP.LastIndex, 2)=rs.IdxField(1).StringValue
UtilSet.LBAP.Cell(UtilSet.LBAP.LastIndex, 3)=rs.IdxField(4).StringValue
rs.MoveNext
Wend
else
Beep
MsgBox "The database couldn't be opened."
end if
db.Close
|