Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with SQLExec () sequences
Message
De
15/11/2012 07:17:10
 
 
À
15/11/2012 06:37:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01557240
Message ID:
01557260
Vues:
53
>>Check FAQ #8150
>
>Hi Borislav, thanks for your help!
>
>Read Vlad's article.Interesting fact is that I just forgot how things are done and even don't remember to involve Vlad in this subject ("Special thanks to Fernando J S Alvares for a few ideas and forcing the investigate of this question." Oh my! I'm getting old...
>
>Anyway, I tried both aproaches and they didn't work. The very first SQLExec() brings all records.
>
> gObjtSQLcommand = "Select * From " + IIf (Empty (cTable_Owner), "", cTable_Owner + ".") + cTable_Name
>
> CursorSetProp ("FetchAsNeeded",.T.,0)
> CursorSetProp ("AllowSimultaneousFetch",.T.,0) 
> CursorSetProp ("FetchSize",300,0)
> SQLSetProp    (gSQLHandle,"Asynchronous",.T.)
> 
> I = 0
> 
> SendMessage (Str(I))
> 
> Do While ! Used ("CurSQLbrowse")
>    I = I + 1
>    SendMessage (Str(I))
>    SQLExec (gSQLHandle, gObjtSQLcommand, "CurSQLbrowse")
> EndDo
> 
> CursorSetProp("FetchAsNeeded",.F.,0)
>
>and
>
> CursorSetProp ("FetchAsNeeded",.T.,0)
> CursorSetProp ("AllowSimultaneousFetch",.T.,0) 
> CursorSetProp ("FetchSize",300,0)
> SQLSetProp    (gSQLHandle,"Asynchronous",.T.)
> 
> SQLPrepare    (nSQLHandle, gObjtSQLcommand, "CurSQLbrowse")
> 
> I = 0
>
> SendMessage (Str(I))
> 
> Do While SQLExec(gSQLHandle) = 0 
>    I = I + 1
>    SendMessage (Str(I))
> EndDo
> 
> CursorSetProp("FetchAsNeeded",.F.,0)
>
Do you have GO TOP/GO BOTTOM somewhere in the code?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform