<body> <form action="?action=search" method="post"> <input type="text" name="search"> <input type="submit" value="搜索"> </form> <% text=Request.Form("search") IF Request.QueryString("action")="search" then Set Rs=Server.CreateObject("Adodb.Recordset") Rs.open "select * from PicNews where title like %'"&text&"'%",strConn,1,1 Do While Not objRs.Eof Response.Write objRs("limage") objRs.MoveNext Loop End IF %> </body> Microsoft VBScript 编译器错误 错误 '800a03f6' 缺少 'End' /iisHelp/common/500-100.asp,行242 Microsoft OLE DB Provider for SQL Server 错误 '80040e14' 第 1 行: '亚' 附近有语法错误。 /xinyu/search.asp,行17
Rs.open "select * from PicNews where title like %'"&text&"'%",strConn,1,1 改成 Rs.open "select * from PicNews where title like ’%"&text&"%‘",strConn,1,1 Microsoft VBScript 编译器错误 错误 '800a03f6' 缺少 'End' /iisHelp/common/500-100.asp,行242 Microsoft VBScript 运行时错误 错误 '800a01a8' 缺少对象: '' /xinyu/search.asp,行18
select * from PicNews where title like ’%"&text&"%‘", select * from PicNews where title like '%"&text&"%'",