Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC not working with variable as parameter
Message
From
24/11/2000 17:29:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SQLEXEC not working with variable as parameter
Miscellaneous
Thread ID:
00445283
Message ID:
00445283
Views:
55
Having trouble with SQL Passthru using VFP 6 and MS SQL 7. I suspend my app where it's failing and manually make a new connection with the following command:

lnhandle=sqlconnect(DSN, UserId, PassWord) - I verify the connection is good.

I define a string variable as lcSQL='Select * from Patient'

This command does NOT work:
lnRetVal = SQLEXEC(lnHandle, lcSQL, "tCursor")

But this one DOES:
lnRetVal = SQLEXEC(lnHandle, 'Select * from Patient', "tCursor")

What gives???
Next
Reply
Map
View

Click here to load this message in the networking platform