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:20:59
 
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00614848
Message ID:
00615427
Views:
35
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform