Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SQLEXEC() to pool data in background
Message
De
14/08/2003 00:20:26
 
 
À
13/08/2003 21:26:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00820004
Message ID:
00820012
Vues:
13
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform