I am running a query thru VB using LIKE command and it should return a value but doesn't. When I run the program in DEBUG mode and grab the SQL query string via COPY and PASTE it into ACCESS the query qorks fine and retruns the record. Why does it not work?
here is a sample of the code:
sqlstring = "SELECT * FROM stone WHERE stone1 LIKE '*" & stone1var & "*' OR stone2 LIKE '*" & stone1var & "*'"
and the copied string is pasting like this:
SELECT * FROM stone WHERE stone1 LIKE '*2-1-222*' OR stone2 LIKE '*2-1-222*'
Can someone help please???
2006-09-01
09:09:25
·
2 answers
·
asked by
solomon d
2
in
Computers & Internet
➔ Programming & Design