Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help - SQLEXEC() syntax
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00515953
Message ID:
00516031
Vues:
16
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform