Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Implementing a Browse with SQL Pass Thru
Message
From
05/02/2002 09:26:25
 
 
To
05/02/2002 09:20:59
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00614848
Message ID:
00615431
Views:
38
This message has been marked as a message which has helped to the initial question of the thread.
BTW, do not forget to set the defaults for "FetchAsNeeded" and "FetchSize" properties to previous values. You probably will have a lot of other SPT cursors that will not need fetching at all. ;)

>Fantastic Vlad, you are the guy!!!
>
>I wish I could give you as many starts as the number of rows found in my test table :-)
>
>Thanks a lot!
>
>Fernando
>
>
> gSQLDataSource = "xxxxxx"
> gSQLUserId     = "xxxxxx"
> gSQLPassword   = "xxxxxx"
>
> gSQLHandle = SqlConnect (gSQLDataSource, gSQLUserId, gSQLPassword)
>
> If gSQLHandle = -1
>   aError (SqlErrorTab)
>   MessageBox ("Erro " + Transform (SqlErrorTab [1], "@L 9999") + ", message: " + AllTrim (SqlErrorTab [2]))
>   Return
> endif
>
> CursorSetProp("FetchAsNeeded",.T., 0)
> CursorSetProp("FetchSize"    ,300, 0)
>
> SQLSetProp (gSQLHandle,"Asynchronous", .T.)
>
> Do While not Used ("MyResult") && SQLEXEC() will return 0 till all records returned.
>                                && When you want to fetch, just wait till alias created with
>                                && first FetchSize number of records (300 in this sample)
>
>    SQLExec (gSQLHandle,"Select * From proddta.f0911", "MyResult")
> enddo
>
> Browse
>
> SqlCancel     (gSQLHandle)
> SqlDisconnect (gSQLHandle)
>
> If Used ("MyResult")
>    Use In MyResult
> endif
>
>
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform