帮我看一下这个是什么错误
谢谢了
Microsoft JET Database Engine 错误 '80040e14'
语法错误 (操作符丢失) 在查询表达式 'like '%%'' 中。
/search.asp,行56
<%dim n,totalrec,currentpage,rowcount
set rs=server.CreateObject("ADODB.RecordSet")
if search="all" then
sql="select ID,FileName,Ver,FileSize,Grade,Chinese,Crack,Best,DateTime,Brief,TotalHits,ViewTimes from Software where FileName like '%"&keyword&"%' or Brief like '%"&keyword&"%' order by ID DESC"
else
sql="select ID,FileName,Ver,FileSize,Grade,Chinese,Crack,Best,DateTime,Brief,TotalHits,ViewTimes from Software where "&search&" like '%"&keyword&"%' order by ID DESC"
end if
rs.cursorlocation = 3 '使用客户端游标,可以使效率提高
rs.pagesize = PageNumber
rs.open sql,conn,1 -----------------------这就是行56
if rs.eof and rs.bof then
response.write "
对不起,此软件还没有被本站收录! |
"
else
if err.number<>0 then '错误处理
response.write "数据库操作失败:" & err.description
err.clear
else
if not (rs.eof and rs.bof) then '检测记录集是否为空
totalrec = RS.RecordCount 'totalrec:总记录条数
if rs.recordcount mod rs.pagesize = 0 then '计算总页数,recordcount:数据的总记录数
n = rs.recordcount\rs.pagesize 'n:总页数
else
n = rs.recordcount\rs.pagesize+1
end if
currentpage = request("page") 'currentpage:当前页
If currentpage <> "" then
currentpage = cint(currentpage)
if currentpage < 1 then
currentpage = 1
end if
if err.number <> 0 then
err.clear
currentpage = 1
end if
else
currentpage = 1
End if
if currentpage*rs.pagesize > totalrec and not((currentpage-1)*rs.pagesize < totalrec)then
currentPage=1
end if
rs.absolutepage = currentpage 'absolutepage:设置指针指向某页开头
rowcount = rs.pagesize%>
<%call listPages()%>
{ 在指尖上绽放的花朵 }
职务:普通成员
等级:5
金币:14.0
发贴:3209
|
#22003/5/10 11:08:04
rs.open sql,conn,1,1
少参数啦~~
|