Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLExec and variable
Message
De
02/04/2003 02:37:00
Liam O'Hagan
O'Hagan Programming Ltd
Irlande
 
 
À
02/04/2003 02:02:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00772836
Message ID:
00772846
Vues:
5
This message has been marked as the solution to the initial question of the thread.
Hi Michael,

Prefix the variable in the SQL statement with a question mark.
lcCustomerID = "CUST01"
lnResult=SQLExec(lnHandle,'SELECT * FROM MyTable WHERE CustomerID=?lcCustomerID')
Regards,

Liam



>What would be the proper approach to benefit of the use of a variable in a SQLExec()? For example, I have a lcCustomerID variable that I would like to use such as:
>
>
>lnResult=SQLExec(lnHandle,'SELECT * FROM MyTable WHERE CustomerID=lcCustomerID')
>
>
>I don't want to parse the value of lcCustomerID in the SQLExec() comment. I would like to preserve the Visual FoxPro variable as is and make use of it within the SQL.
Liam O'Hagan
MCP VFP Desktop Apps
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform