>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