Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help - SQLEXEC() syntax
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00515953
Message ID:
00516031
Views:
15
>Mark:
> I am getting the same error too few parameters. expected 1.
>This is my code:
>
>sql_str = "select * from quotetype where qtClientID = '"+ m.Client_id +"' and qtQuotekey = " + alltrim(Transform(m.totQuote,'@Z'))
>(everything looks good at this point)
>sqlexec(handle,sql_str,"mycursor")
>
>sherry

Sherry,

Try building your sql with brackets first. Then, make sure handle is valid. Then, try using single quotes around the cursor name. If handle is a valid handle and the sql is valid (including datatypes) you should not get an error from sqlexec(). If the ODBC driver fails, sqlexec() will return -1 at which point you can use aerror() to get the ODBC specific error message.

HTH
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Previous
Reply
Map
View

Click here to load this message in the networking platform