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.
SQL Search problem
所有跟帖:
•
i just figure it out
-iamdumb-
♀
(115 bytes)
()
06/23/2004 postreply
12:00:51
•
Suggest use search procedure
-DBDB-
♀
(885 bytes)
()
06/23/2004 postreply
13:32:52