James,
I implemented the desired Browse functionality, using the statements sequence Vlad told me to (see in this thread - message #
615397). Actually it is implemented in a "fetchasneeded" way. I wanted to simulate a VFP DBF Browse and it does that just by fetching more records when user wants it, moving the "record pointer" beyond the browse window bottom.
There is another sequence, in the same program (it is a small utility to be used by developers, not end users!), to perform SQL Selects entered in an edit window by the user, that provides them with the ability to pause it and then cancel it or continue:
SqlPrepare (gSQLHandle, gObjtSQLcommand, "SQLcurSelect")
. . .
CursorSetProp ("FetchSize", 100 , 0 )
SQLSetProp (gSQLHandle, "Asynchronous", .T.)
Do While SQLExec (gSQLHandle) = 0
If InKey (.001) = 27
If MessageBox ("Do you want to stop the executing Select ?", (4+48+256), cCaption) = 7
Loop
endif
SqlCancel (gSQLHandle)
Exit
endif
EndDo
CursorSetProp ("FetchSize", 300 , 0 )
SQLSetProp (gSQLHandle, "Asynchronous", .F.)
The Inkey (.001) idea is not the best solution, but I'm still developing the whole thing, and latter I'll provide a better shape to it. I'm still learning how to tame this (SPT) beast!
Fernando