求助:至少一个参数没有被指定值
错误提示:
Microsoft JET Database Engine 错误 '80040e10 '
至少一个参数没有被指定值。
search11.asp,行 110
以下是search11.asp部份文件,
<%
dim rs
set rs=server.createobject( "ADODB.recordset ")
dim class1,class2,leixing,diqu,key
class1=request( "class1 ")
class2=request( "class2 ")
leixing=request( "leixing ")
diqu=request( "diqu ")
key=request( "key ")
%>
<%
dim re,page,i
set re=server.createobject( "ADODB.recordset ")
dim sql
sql= "select * from [xinxi] where biaoti like '% "& key & "% ' "
if class1 <> " " then
sql=sql& " and class1= "&class1
end if
if class2 <> " " then
sql=sql& " and class2= "&class2
end if
if leixing <> " " then
sql=sql& " and leixing= "&leixing
end if
if diqu <> " " then
sql=sql& " and diqu= "&diqu
end if
sql=sql& " and yz=1 order by id desc "
rs.open sql,conn,1,1 / 此行是第110行
%>
数据库中的字段不缺
在此对回帖的人,表示谢谢
------解决方案--------------------if diqu <> " " then
sql=sql& " and diqu= ' " & diqu & " ' "
end if