Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Pass-Through Asyncronous and Batch mode.
Message
De
17/03/2003 11:14:51
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
SQL Pass-Through Asyncronous and Batch mode.
Divers
Thread ID:
00766577
Message ID:
00766577
Vues:
55
* on VFP Environment set sysmenu>options>Remote Data>FetchSize=100

* on SQL Server Database exist a Table [anyTable] with > 10000 records

_SCREEN.Cls

h=SQLSTRINGCONNECT(AnyStringConnectionSQLServer) && or SQLCONNECT(anydnsCon)

=SQLSETPROP(h,"Asynchronous",.T.),SQLSETPROP(h,"BatchMode",.T.)

SELECT 0

hStatus=SQLEXEC(h,"select*from [anyTable]","cursor")

? 'init with ', hStatus && VFP[6,7,8] hStatus = 0

DO WHILE m.hStatus=0 AND EMPTY(ALIAS())

WAIT WINDOWS "Wait data" TIMEOUT 100

hStatus=SQLEXEC(h) && If hStatus=0 -> wait SQL complete download data
ENDDO

? 'exit with ',hStatus

* on VFP[6,7] hStatus = 0 data download run
* on VFP8 hStatus = 1 data download end

BROWSE
USE
=SQLCANCEL(h),SQLDISCONNECT(h)


* On VFP6,VFP7 versions do while exit after first 100 records are downloaded
* remainder data are downloaded on background, at 100 records block at time

* On VFP8 version, all records are downloaded as soon as SQLEXEC(h) returns 1
* and time to see first data on BROWSE is long.

* If is set SQLSETPROP(h,"BatchMode",.F.) this works like in
* the previous VFP versions.

* We have very many grid filled up in asynchronous modality through of the Timers.
* We must pass in modality not Batch!? ( double check with SQLMORERESULT())

* Someone uses this modality?
* It is a bug?

Hello Fabio
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform