I'm trying to create a select statement to Pervasive using VB6 and ODBC
the issues I'm having is that for some reason when I use the following code:
there is a "Select * from" automatically inserted at the beginning of the sqlString and executed in this fashion, and therefore I get a syntax error:
"Syntax Error: select * from Select<<???>> * from ORDER_DTL where ORD_ORDER_NO like '%700500%'"
However, when I print out sqlString as text and run it on the PSQL query analyzer, the query ran fine without the extra select * from.
I was able to step around this issue by setting the rs.source spearately and then call rs.open after.
However, even if the query runs it doesn't return any records, but if I run the text on sqlString on the PSQL query analyzer it returns me the appropriate records.
Please help
- d
the issues I'm having is that for some reason when I use the following code:
Code:
sqlString = "Select * from ORDER_DTL where ORD_ORDER_NO like '%" & ORD_ORDER_NO & "%'"
rs.Open sqlString, cnBV, , , adCmdTable
"Syntax Error: select * from Select<<???>> * from ORDER_DTL where ORD_ORDER_NO like '%700500%'"
However, when I print out sqlString as text and run it on the PSQL query analyzer, the query ran fine without the extra select * from.
I was able to step around this issue by setting the rs.source spearately and then call rs.open after.
However, even if the query runs it doesn't return any records, but if I run the text on sqlString on the PSQL query analyzer it returns me the appropriate records.
Please help
- d