Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select SQl data using arrays
Message
 
À
15/08/2009 07:15:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01418215
Message ID:
01418222
Vues:
53
>The problem is that I DO NOT create the local cursor by selecting data from SQL server data.

Then you are stuck for creating the string and pass it to SQL Server:
lcKeys = []
SELECT LocalCursor
SCAN
   lcKeys = lcKeys + TRANSFORM(KeyField)+[,]
ENDSCAN
TEXT TO lcSQL NOSHOW TEXTMERGE
     SELECT * FROM YourTable WHERE SomeField IN (<<LEFT(lcKeys,LEN(lcKeys)-1))>>
ENDTEXT
IF SQLEXEC(sqlHandler, lcSQL, "NewVFPCursor") < 0
   AERROR(laError)
   MessageBox(laError[1,2])
ENDIF
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