asp定义记录集,错误代码《0x80040E07》

来源:百度知道 编辑:UC知道 时间:2024/09/28 15:28:40
按set rs=server.createobject("adodb.recordset")
sql="select * from news where n_type=1 "
rs.open sql,conn,1,1
rs.PageSize=20
page_count=rs.PageCount
all_record=rs.recordcount
If(all_record<1) Then
response.Write "<div align=center><font class=ipage>对不起,没有新的新闻!</font></div>"
else

这样 总显示-----------------------
Microsoft JET Database Engine (0x80040E10)
至少一个参数没有被指定值。
/jingguan/admin/listnews.asp, 第 49 行

我想按news记录集里的type里面为数字1或2或3或4
我想按type=1 显示记录 为什么出现 至少一个参数没有被指定值呢??
第49行是rs.open sql,conn,1,1

看一下你的字符类型是否设置成数字类型
或者改成sql="select * from news where n_type='1' "
试试看

楼主,你49行是哪行代码?
检查一下是不是字段名写错了,还有conn是否定义