Everytime when the search word contain a ' (ex. Child's)
my search page cause a problem like:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '%'.
search.asp line 103
the following is my code:
SearchFor = TRIM ( Request("searchFor") )
.
.
.
open_statement = "SELECT * from User where Name like '%" & searchFor & "%' "
How can I fix the problem? Thanks so much for your help.