I am using the VFP ODBC driver to query a FP2.6 table. However I get the following error:
Warning: SQL error: [Microsoft][ODBC Visual FoxPro Driver]File 'instr.prg' does not exist., SQL state S0002 in SQLExecDirect in c:\phpdev\ on line 62
when running the follow query:
select location.loc_id, location.loc_co, pr_serial,tr_date,tr_code,tr_memo from prtrans left join location on location.loc_id = prtrans.loc_id where instr(tr_memo, '$searchterm1') or pr_serial = '$searchterm1'";
It seems the problem is the instr(tr_memo, '$searchterm1') part of the statement because if I remove that part, it will return information. I have tried the full query on directy on another table and it does work. I think it is the way the the ODBC driver is translating or parsing the statement.
The reason for that part of the statement is the I need to search a memo field for a string. Different solutions to get this done would also be appreciated.
How can I get this resolved?
Where can I find a reference for the command and structure that the ODBC driver will accept?
Thank you
Warning: SQL error: [Microsoft][ODBC Visual FoxPro Driver]File 'instr.prg' does not exist., SQL state S0002 in SQLExecDirect in c:\phpdev\ on line 62
when running the follow query:
select location.loc_id, location.loc_co, pr_serial,tr_date,tr_code,tr_memo from prtrans left join location on location.loc_id = prtrans.loc_id where instr(tr_memo, '$searchterm1') or pr_serial = '$searchterm1'";
It seems the problem is the instr(tr_memo, '$searchterm1') part of the statement because if I remove that part, it will return information. I have tried the full query on directy on another table and it does work. I think it is the way the the ODBC driver is translating or parsing the statement.
The reason for that part of the statement is the I need to search a memo field for a string. Different solutions to get this done would also be appreciated.
How can I get this resolved?
Where can I find a reference for the command and structure that the ODBC driver will accept?
Thank you