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:
00515980
Vues:
13
>Hello All:
> I having working on a project that uses sqlexec()for different sql statements. Where could find information on syntax. What will be the correct syntax for sql with and statement:
>m.client_id = "test"
>m.totquote = 2
>sqlexec(handle, "select * from quotetype where qtclientid = ?m.client_id and qtquotekey = m.totquote","mycursor")
>
>error returned: too few parameters. expected 5. from odbc driver.
>State will work if I only have one condition. thanks.
>sherry

For SQL Passthru, you have to build the SQL like the following assuming both variables are character data types:

lcSQL = "select * from quotetype where qtclientid = '" + m.client_id + "' and qtquotekey = '" + m.totquote + "'"

SQLExec(lnHandle, lcSQL, "MyCursor")
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform