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:
00515980
Views:
12
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform