Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Implementing a Browse with SQL Pass Thru
Message
From
07/02/2002 12:03:29
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
06/02/2002 12:34:47
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00614848
Message ID:
00616720
Views:
31
Fernando

Very interesting. I will have to study this more. I have never used SqlPrepare.

James

>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
Previous
Reply
Map
View

Click here to load this message in the networking platform