Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Implementing a Browse with SQL Pass Thru
Message
De
05/02/2002 09:20:59
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00614848
Message ID:
00615427
Vues:
36
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform