asp 错误 (0x800A0BB9) 参数类型不正确,或不在可以接受的范围之内,
错误类型:ADODB.Recordset(0x800A0BB9)参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。/mission/chakan.asp,第63...
错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/mission/chakan.asp, 第 63 行
请各位高手指点指点
||---------------------------------------------------||
</head>
<body>
<%
if isNull(Session("un")) or Session("un")="" then
yhm="游客"
else
yhm=Session("un")
end if
Response.Write(yhm)
%>
您好,欢迎您使用!</p>
<div align="center">
<table width="760" border="0" bordercolor="#FFFFFF" bgcolor="#666666">
<tr bgcolor="#FFFFFF">
<td><span class="style10">时间</span></td>
<td><span class="style10">作者</span></td>
<td><span class="style10">标题</span></td>
<td><span class="style10">类别</span></td>
<td><span class="style10">点击率</span></td>
<td><span class="style10">操作</span></td>
</tr>
<%
dim page,pc
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\office.mdb")
Set rs=Server.CreateObject("ADODB.Recordset")
Set rs.ActiveConnection = Conn
rs.CursorType = 3
rs.Open "Select * from form1 order by f_id desc"
rs.pagesize = 5
page = cint(page)
pc = rs.pagecount
if page = "" then
page = 1
end if
if page > pc then
page = pc
end if
rs.absolutepage = page -------错在这里!!!----------
rCount = rs.RecordCount
session("un")=rs("f_publishname")
i=0
dim bgc
do while not rs.eof and i < rs.pagesize
if i mod 2 =1 then
bgC="white"
else
bgc="#F1F1F1"
end if
%>
<tr bgcolor="<%Response.Write(bgc)%>" onMouseOver="this.bgColor='#DFDFDF'" onMouseOut="this.bgColor='<%Response.Write(bgc)%>'">
<td><%=rs("f_publishtime")%></td>
<td><%=rs("f_publishname")%></td>
<td><%=rs("f_title")%></td>
<td><%=rs("f_majorclass")%></td>
<td><%=rs("f_clickrate")%></td>
<td><a href="userdel.asp?uname=<%=rs("f_publishname")%>">删除</a>
<a href="modify.asp?fid=<%=rs("f_id")%>">修改</a></td>
</tr>
<p>
<%
i = i + 1
rs.MoveNext
loop
response.Write("</table><br>")
If rCount = 0 Then
Response.Write "<tr align='center'><td colspan=6><font color=red>目前还没有用户记录</font></td></tr>"
</font></td></tr>"
end if
%>
<br></br>
<br>当前页码:<%=page%>/<%=rs.pagecount%></br>
<%
if page = 1 then
response.Write("第一页")
else
response.Write("<a href = chakan.asp?page=1>第一页</a>")
end if
if page = 1 then
response.Write("上一页")
else
response.Write("<a href = chakan.asp?page="& page - 1 &">上一页</a>")
end if 展开
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/mission/chakan.asp, 第 63 行
请各位高手指点指点
||---------------------------------------------------||
</head>
<body>
<%
if isNull(Session("un")) or Session("un")="" then
yhm="游客"
else
yhm=Session("un")
end if
Response.Write(yhm)
%>
您好,欢迎您使用!</p>
<div align="center">
<table width="760" border="0" bordercolor="#FFFFFF" bgcolor="#666666">
<tr bgcolor="#FFFFFF">
<td><span class="style10">时间</span></td>
<td><span class="style10">作者</span></td>
<td><span class="style10">标题</span></td>
<td><span class="style10">类别</span></td>
<td><span class="style10">点击率</span></td>
<td><span class="style10">操作</span></td>
</tr>
<%
dim page,pc
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\office.mdb")
Set rs=Server.CreateObject("ADODB.Recordset")
Set rs.ActiveConnection = Conn
rs.CursorType = 3
rs.Open "Select * from form1 order by f_id desc"
rs.pagesize = 5
page = cint(page)
pc = rs.pagecount
if page = "" then
page = 1
end if
if page > pc then
page = pc
end if
rs.absolutepage = page -------错在这里!!!----------
rCount = rs.RecordCount
session("un")=rs("f_publishname")
i=0
dim bgc
do while not rs.eof and i < rs.pagesize
if i mod 2 =1 then
bgC="white"
else
bgc="#F1F1F1"
end if
%>
<tr bgcolor="<%Response.Write(bgc)%>" onMouseOver="this.bgColor='#DFDFDF'" onMouseOut="this.bgColor='<%Response.Write(bgc)%>'">
<td><%=rs("f_publishtime")%></td>
<td><%=rs("f_publishname")%></td>
<td><%=rs("f_title")%></td>
<td><%=rs("f_majorclass")%></td>
<td><%=rs("f_clickrate")%></td>
<td><a href="userdel.asp?uname=<%=rs("f_publishname")%>">删除</a>
<a href="modify.asp?fid=<%=rs("f_id")%>">修改</a></td>
</tr>
<p>
<%
i = i + 1
rs.MoveNext
loop
response.Write("</table><br>")
If rCount = 0 Then
Response.Write "<tr align='center'><td colspan=6><font color=red>目前还没有用户记录</font></td></tr>"
</font></td></tr>"
end if
%>
<br></br>
<br>当前页码:<%=page%>/<%=rs.pagecount%></br>
<%
if page = 1 then
response.Write("第一页")
else
response.Write("<a href = chakan.asp?page=1>第一页</a>")
end if
if page = 1 then
response.Write("上一页")
else
response.Write("<a href = chakan.asp?page="& page - 1 &">上一页</a>")
end if 展开
4个回答
2007-11-21
展开全部
Response.Write(bgc)换成Response.Write bgc看看
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Set rs.ActiveConnection = Conn
rs.CursorType = 3
rs.Open "Select * from form1 order by f_id desc"
改成 rs.Open "Select * from form1 order by f_id desc",conn,1,1
rs.CursorType = 3
rs.Open "Select * from form1 order by f_id desc"
改成 rs.Open "Select * from form1 order by f_id desc",conn,1,1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
page = cint(page) '这里的值来自那里呢你好象漏写了
page=Request.QueryString("page")'改成获取翻页连接传来的PAGE参数
我就改了这里和下面这依据就OK了,你试试吧:
...
If rCount = 0 Then
Response.Write "<tr align='center'><td colspan=6><font color=red>目前还没有用户记录</font></td></tr>"
---</font></td></tr>" '这里是你发帖的时候弄错的吧,多余的删了
.....
其它的如2,4楼的提醒,翻页函数也要再检查一下
我调试成功的代码:
两个文件在同一目录下
office.mdb:
f_id ’自动编号
f_name’文本
x.asp:
<div align="center">
<table width="760" border="0" bordercolor="#FFFFFF" bgcolor="#666666">
<tr bgcolor="#FFFFFF">
<td><span class="style10">时间</span></td>
<td><span class="style10">作者</span></td>
<td><span class="style10">标题</span></td>
<td><span class="style10">类别</span></td>
<td><span class="style10">点击率</span></td>
<td><span class="style10">操作</span></td>
</tr>
<%
dim page,pc
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("office.mdb")
Set rs=Server.CreateObject("ADODB.Recordset")
Set rs.ActiveConnection = Conn
rs.CursorType = 3
rs.Open "Select * from form1 order by f_id desc"
rs.pagesize = 5
page = Request.QueryString("page")
pc = rs.pagecount
if page = "" then
page = 1
end if
if page > pc then
page = pc
end if
rs.absolutepage = page '-------错在这里!!!----------
rCount = rs.RecordCount
i=0
dim bgc
do while not rs.eof and i < rs.pagesize
if i mod 2 =1 then
bgC="white"
else
bgc="#F1F1F1"
end if
%>
<tr bgcolor="<%Response.Write(bgc)%>" onMouseOver="this.bgColor='#DFDFDF'"
onMouseOut="this.bgColor='<%Response.Write(bgc)%>'">
<td><%=rs("f_id")%></td>
<td><%=rs("f_name")%></td>
<td><a href="userdel.asp?uname=<%=rs("f_name")%>">删除</a>
<a href="modify.asp?fid=<%=rs("f_id")%>">修改</a></td>
</tr>
<p>
<%
i = i + 1
rs.MoveNext
loop
response.Write("</table><br>")
If rCount = 0 Then
Response.Write "<tr align='center'><td colspan=6><font color=red>目前还没有用户记录
</font></td></tr>"
end if
%>
<br></br>
<br>当前页码:<%=page%>/<%=rs.pagecount%></br>
<%
if page = 1 then
response.Write("第一页")
else
response.Write("<a href = chakan.asp?page=1>第一页</a>")
end if
if page = 1 then
response.Write("上一页")
else
response.Write("<a href = chakan.asp?page="& page - 1 &">上一页</a>")
end if
%>
page=Request.QueryString("page")'改成获取翻页连接传来的PAGE参数
我就改了这里和下面这依据就OK了,你试试吧:
...
If rCount = 0 Then
Response.Write "<tr align='center'><td colspan=6><font color=red>目前还没有用户记录</font></td></tr>"
---</font></td></tr>" '这里是你发帖的时候弄错的吧,多余的删了
.....
其它的如2,4楼的提醒,翻页函数也要再检查一下
我调试成功的代码:
两个文件在同一目录下
office.mdb:
f_id ’自动编号
f_name’文本
x.asp:
<div align="center">
<table width="760" border="0" bordercolor="#FFFFFF" bgcolor="#666666">
<tr bgcolor="#FFFFFF">
<td><span class="style10">时间</span></td>
<td><span class="style10">作者</span></td>
<td><span class="style10">标题</span></td>
<td><span class="style10">类别</span></td>
<td><span class="style10">点击率</span></td>
<td><span class="style10">操作</span></td>
</tr>
<%
dim page,pc
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("office.mdb")
Set rs=Server.CreateObject("ADODB.Recordset")
Set rs.ActiveConnection = Conn
rs.CursorType = 3
rs.Open "Select * from form1 order by f_id desc"
rs.pagesize = 5
page = Request.QueryString("page")
pc = rs.pagecount
if page = "" then
page = 1
end if
if page > pc then
page = pc
end if
rs.absolutepage = page '-------错在这里!!!----------
rCount = rs.RecordCount
i=0
dim bgc
do while not rs.eof and i < rs.pagesize
if i mod 2 =1 then
bgC="white"
else
bgc="#F1F1F1"
end if
%>
<tr bgcolor="<%Response.Write(bgc)%>" onMouseOver="this.bgColor='#DFDFDF'"
onMouseOut="this.bgColor='<%Response.Write(bgc)%>'">
<td><%=rs("f_id")%></td>
<td><%=rs("f_name")%></td>
<td><a href="userdel.asp?uname=<%=rs("f_name")%>">删除</a>
<a href="modify.asp?fid=<%=rs("f_id")%>">修改</a></td>
</tr>
<p>
<%
i = i + 1
rs.MoveNext
loop
response.Write("</table><br>")
If rCount = 0 Then
Response.Write "<tr align='center'><td colspan=6><font color=red>目前还没有用户记录
</font></td></tr>"
end if
%>
<br></br>
<br>当前页码:<%=page%>/<%=rs.pagecount%></br>
<%
if page = 1 then
response.Write("第一页")
else
response.Write("<a href = chakan.asp?page=1>第一页</a>")
end if
if page = 1 then
response.Write("上一页")
else
response.Write("<a href = chakan.asp?page="& page - 1 &">上一页</a>")
end if
%>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询