Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I use an array as parameter in SPT?
Message
De
27/12/1999 13:25:03
 
 
À
27/12/1999 12:55:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00308814
Message ID:
00308835
Vues:
26
You could also build an In clause in VFP with your array and use that in the SPT.

EX.

FOR I = 1 TO ALEN(myArray)
lcInClause = lcInClause + "'" + myArray(I) "'" + ","
ENDFOR
lcInClause = SUBSTR(lcInClause,1,LEN(lcInClause) - 1) && remove extra comma

=sqlexec(handle, "select * from ... where field in(&lcInClause)","mycursor")

>>
>>The server can't execute this; that'd have to be executed locally rather than remotely because your memory space is not visible to it. You'd need to dump the array into a cursor on the backend and use an IN clause in the WHERE clause.
>
>How to create a cursor on backend?
>Thanks
>Ed

(On an infant's shirt): Already smarter than Bush
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform