Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLExec and variable
Message
From
02/04/2003 02:37:00
Liam O'Hagan
O'Hagan Programming Ltd
Ireland
 
 
To
02/04/2003 02:02:48
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00772836
Message ID:
00772846
Views:
6
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform