>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