Hello!
I have a SELECT query that is used to search business names in a database. In some cases, it works...in others, it doesn't. Here is what I mean:
It works if there is no special characters such as ' , & . etc.
BUT...if someone enters a business name of (for example) Dewey, Cheetam & Howe OR Dewey's Business then the search does not find the business name (even though it is in the database).
My SELECT query (for simplicity) reads as:
leadSrch=Request.Form("bus_name")
sqlLeadSrch="SELECT * FROM requests WHERE bus_name = '" & leadSrch & "';"
I know I'm probably missing something very minor...but is there a way to get my SELECT query to pull records that contain business names such as Dewey, Cheetam & Howe?
Any help or advice or google search would be greatly appreciated!
thanks...G!
I have a SELECT query that is used to search business names in a database. In some cases, it works...in others, it doesn't. Here is what I mean:
It works if there is no special characters such as ' , & . etc.
BUT...if someone enters a business name of (for example) Dewey, Cheetam & Howe OR Dewey's Business then the search does not find the business name (even though it is in the database).
My SELECT query (for simplicity) reads as:
leadSrch=Request.Form("bus_name")
sqlLeadSrch="SELECT * FROM requests WHERE bus_name = '" & leadSrch & "';"
I know I'm probably missing something very minor...but is there a way to get my SELECT query to pull records that contain business names such as Dewey, Cheetam & Howe?
Any help or advice or google search would be greatly appreciated!
thanks...G!