Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using SQLEXEC() to pool data in background
Message
From
14/08/2003 00:20:26
 
 
To
13/08/2003 21:26:12
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00820004
Message ID:
00820012
Views:
14
This task is very easy if you use a remote view, in the remote view properties, you can set up the number of records to fetch at a time and fetch remote data as needed. With SQLEXEC you need to set up the conection y asyncronus execution = .T., but you recive the data in several packages using SQLMORERESULTS.

The following example assumes SQLCONNECT( ) is successfully issued,
and its return value is stored to a memory variable named gnHandle. SQLSETPROP( ) is used to set the BatchMode property to False (.F.)
so the individual result sets can be retrieved.

SQLMORERESULTS( ) is issued twice to create two cursors containing the results of the SQLEXEC( ) query.
SET is used to display the View window and the cursors created by SQLEXEC( ).

= SQLSETPROP(gnHandle, 'BatchMode', .F.) && Individual result sets
= SQLEXEC(gnHandle, 'SELECT * FROM authors;
SELECT * FROM titles')
= SQLMORERES(gnHandle) && First result set
= SQLMORERES(gnHandle) && Second result set

I prefer the remote view because I can retrieve the whole package in one cursor.
Carlos A. Miranda
E.I.S.lnc
President
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform