HaworthBantam
Programmer
I have an ADODC data object on a form, connecting to a backend Access97 database, within a VB6.0 application.
My problem is with the SQL string. The following string works....
strMySQL = "SELECT * FROM tblBankGiro WHERE Name = " & "'" & strNameSearch & "'"
Obviously here the user is keying the full name which is assigned to the parameter strNameSearch.
What doesn't work is the following....
strMySQL = "SELECT * FROM tblBankGiro WHERE Name Like " & "'*" & strNameSearch & "*'"
This has got to be something obvious that I'm missing, any help would be greatly appreciated.
Thanks.
My problem is with the SQL string. The following string works....
strMySQL = "SELECT * FROM tblBankGiro WHERE Name = " & "'" & strNameSearch & "'"
Obviously here the user is keying the full name which is assigned to the parameter strNameSearch.
What doesn't work is the following....
strMySQL = "SELECT * FROM tblBankGiro WHERE Name Like " & "'*" & strNameSearch & "*'"
This has got to be something obvious that I'm missing, any help would be greatly appreciated.
Thanks.