在后台删除信息的时候,出现一个怪问题
Microsoft VBScript 运行时错误 错误 '800a000d '
类型不匹配: '[string: " "] '
/admin/replyadmin.asp,行 104
代码部份:
<% set rs=Server.CreateObject( "ADODB.Recordset ")
sql= "select * from reply order by id desc "
rs.open sql,conn,1,1
pagesize=20
Rs.pagesize=pagesize
page=Request( "page ")
if (page-Rs.pagecount) > 0 then ------104行
page=Rs.pagecount
elseif page = " " or page < 1 then
page = 1
end if
i=0
do while not rs.eof
%>
------解决方案--------------------page=CInt(Request( "page "))
就好了~
------解决方案--------------------把103行page=Request( "page ")改成
If IsNumeric(Request( "page ")) Then
page=CInt(Request( "page "))
Else
page=1
End If
If page <1 Then page=1
------解决方案--------------------给你写个全的吧
<%
set rs=Server.CreateObject( "ADODB.Recordset ")
sql= "select * from reply order by id desc "
rs.open sql,conn,1,1
pagesize=20
If Not rs.Eof Then
If IsNumeric(Request( "page ")) Then
page=CInt(Request( "page "))
Else
page=1
End If
rs.Pagesize=pagesize
If page <1 Then page=1
If page> rs.Pagecount Then page=rs.Pagecount
rs.AbsolutePage=page
For i=1 To pagesize
If rs.Eof Then exit For
Response.Write(rs(0))
rs.Movenetx
Next
Else
Response.Write( "暂无数据 ")
End If
%>
------解决方案--------------------统一数据类型.
------解决方案--------------------page=Request( "page ")
在你原代码的基础上加一句
page = 1
然后
再改这里
page=CInt(Request( "page "))
我的网站开发群9199502
------解决方案--------------------page = 1
page=Request( "page ")
顺序别搞错了
这样写的
------解决方案--------------------cint(page)
------解决方案--------------------page=request( "page ")
if page= " " then
page=1
elseif not isNumeric(page) then
page=1
else
page=abs(int(page))
end if
------解决方案--------------------page=Request( "page ")
if page= " " then page=1