ASP错误:参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。 怎么处理?

百倍 2012-08-29 05:57:24
ASP服务器发现运行时错误:
错 误 码:0x800A0BB9
错误代码:Rs.open sql,Conn,1,1
错误描述:参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
我把它改为Rs.open sql,Conn,2,3也不行
想问问这参数怎么设置才好

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/Connect.asp" -->
<%
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select top 8 * from Chinese where type=1 order by Rnd()"
rs.Open sql,conn,1,1
While Not rs.eof
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<p> </p><div><%=rs("content")%>
<p><%=rs("content")%></p></div>
</p>
</body>
</html>
<%
rs.movenext
wend
%>

<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
...全文
120 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
Dogfish 2012-08-30
  • 打赏
  • 举报
回复
conn的连接没有成功。
深深的夜 2012-08-30
  • 打赏
  • 举报
回复
Recordset1.Close()
Set Recordset1 = Nothing
Recordset1 哪来的 没定义当然冲突
  • 打赏
  • 举报
回复
那个晕死,你都还没打开数据库呢
Connect.asp里都还没有打开数据库啊
百倍 2012-08-29
  • 打赏
  • 举报
回复
具体错误:
错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/collecterrorpre/Chinese/allout.asp, 第 6 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727)

网页:
GET /collecterrorpre/Chinese/allout.asp
百倍 2012-08-29
  • 打赏
  • 举报
回复
Connect.asp的内容

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_Connect_STRING
MM_Connect_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=C:\Inetpub\wwwroot\collerrp.mdb"
%>
  • 打赏
  • 举报
回复
<!--#include file="../Connections/Connect.asp" -->
应该在这个文件里吧
有一个on开头的
去掉看下详细的错误提示吧
百倍 2012-08-29
  • 打赏
  • 举报
回复
容错代码是哪一句?
  • 打赏
  • 举报
回复
建议你把容错代码去掉了看看
还有type用··这个括起来吧

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧