Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with SQLExec () sequences
Message
From
15/11/2012 07:17:10
 
 
To
15/11/2012 06:37:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01557240
Message ID:
01557260
Views:
55
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform