Is there a faster way to display a large SQL result?
Posted: Mon Jul 09, 2007 6:52 pm
My code is pretty simple.
put "SELECT * FROM VEH_DATA where license = '" & vLic & "';" into vSQL
put fld "dbid" into dbconnect
put revQueryDatabase(dbconnect, vSQL) into cID
put revNumberofRecords(cID) into vRecNo
put revDatabaseColumnCount(cID) into vColNum
revMoveToFirstRecord cID
Repeat vRecNo of times
repeat with c = 1 to vColNum
put revDatabaseColumnNumbered(cID, c) into vRow
replace cr with empty in vrow
put vRow & tab after fld "history"
end repeat
put cr after fld "history"
revMovetoNextRecord cID
end repeat
When this code executes my stack is some what suspended and I can not work with it while it is populating the text field list. The text field has 8 columns. Some queries could be hundreds of lines long and the user has to wait for revolution to get done filling the text field before any other buttons can be pressed or start viewing the data. Is there a faster way to display the results of the SQL query? If Im unclear on my question let me know, Ill try to be more specific.
put "SELECT * FROM VEH_DATA where license = '" & vLic & "';" into vSQL
put fld "dbid" into dbconnect
put revQueryDatabase(dbconnect, vSQL) into cID
put revNumberofRecords(cID) into vRecNo
put revDatabaseColumnCount(cID) into vColNum
revMoveToFirstRecord cID
Repeat vRecNo of times
repeat with c = 1 to vColNum
put revDatabaseColumnNumbered(cID, c) into vRow
replace cr with empty in vrow
put vRow & tab after fld "history"
end repeat
put cr after fld "history"
revMovetoNextRecord cID
end repeat
When this code executes my stack is some what suspended and I can not work with it while it is populating the text field list. The text field has 8 columns. Some queries could be hundreds of lines long and the user has to wait for revolution to get done filling the text field before any other buttons can be pressed or start viewing the data. Is there a faster way to display the results of the SQL query? If Im unclear on my question let me know, Ill try to be more specific.