日期:2014-05-17  浏览次数:20811 次

ASP错误:参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。 怎么处理?
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>&nbsp;</p><div><%=rs("content")%>
 <p><%=rs("content")%></p></div>
</p>
</body>
</html>
<%
  rs.movenext
  wend
%>

<%
Recordset1.Close()
Set Recordset1 = Nothing
%>


------解决方案--------------------
建议你把容错代码去掉了看看
还有type用··这个括起来吧

------解决方案--------------------
<!--#include file="../Connections/Connect.asp" -->
应该在这个文件里吧
有一个on开头的
去掉看下详细的错误提示吧
------解决方案--------------------
那个晕死,你都还没打开数据库呢
Connect.asp里都还没有打开数据库啊
------解决方案--------------------
conn的连接没有成功。
------解决方案--------------------
Recordset1.Close()
Set Recordset1 = Nothing
Recordset1 哪来的 没定义当然冲突