I have a vb/sql quesry that sort of works, and I cant tell where the error is. Here is the code.
strPullSQL = "SELECT * from bw5833.test_table WHERE (username LIKE '%" & txtSearch & "%') AND (Date_Run LIKE '%" & txtDate & "%') AND (PI_Value LIKE '%" & txtPI.Text & "%')"
When I enter info into the txtSearch variable (all letters), it searches the db great. However, whenever I enter info into the txtDate or the txtPI variable, it returns ALL records. Why would it work with one and not the others?
Here is a hint....When I run the program against anything other than txtDate, I get a "Partial String Matching requires charachter operands" which I can find no information on in the Black Book.
The line of code that it points to is
EDWInfpen strPullSQL, Cnxn, adOpenForwardOnly, adLockReadOnly, adCmdText
Any help would be greatly appreciated
strPullSQL = "SELECT * from bw5833.test_table WHERE (username LIKE '%" & txtSearch & "%') AND (Date_Run LIKE '%" & txtDate & "%') AND (PI_Value LIKE '%" & txtPI.Text & "%')"
When I enter info into the txtSearch variable (all letters), it searches the db great. However, whenever I enter info into the txtDate or the txtPI variable, it returns ALL records. Why would it work with one and not the others?
Here is a hint....When I run the program against anything other than txtDate, I get a "Partial String Matching requires charachter operands" which I can find no information on in the Black Book.
The line of code that it points to is
EDWInfpen strPullSQL, Cnxn, adOpenForwardOnly, adLockReadOnly, adCmdText
Any help would be greatly appreciated