iamdumb2004-06-23 19:50:50
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.

iamdumb2004-06-23 20:00:51
i just figure it out
DBDB2004-06-23 21:32:52
Suggest use search procedure