Microsoft VBScript 运行时错误 错误 '800a01f4' 怎么解决?

w43869121 2010-08-03 12:32:46
Microsoft VBScript 运行时错误 错误 '800a01f4'
变量未定义: 'idlist'
/Admin/UCCDK/cdkey.asp,行 32

能打开只要不执行删除就不出现错误如图

<!-- #Include File="../Include/Admin_Onlogin.asp" -->
<link href="5wuc.css" rel="stylesheet" type="text/css">
<%
if not isempty(request("del")) then
if request("del")="all" then
if request("type")="" or isnull(request("type")) then
sql="select * from Game_cdkey where game_id='"&request("game_id")&"'"
Set rs = YSvoid.Exec(sql,1)
else
sql="select * from Game_cdkey where game_id='"&request("game_id")&"' and type="&request("type")
Set rs = YSvoid.Exec(sql,1)
end if
do while not rs.eof
rs.delete
rs.movenext
loop
end if
end if

dim totalPut,game_id,type1
dim CurrentPage
dim TotalPages,maxperpage
maxperpage=30
dim k
k=1
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
if not isempty(request("selAnnounce")) then
idlist=request("selAnnounce")
if instr(idlist,",")>0 then
dim idarr
idArr=split(idlist)
for i = 0 to ubound(idarr)
id=clng(idarr(i))
call deleteannounce(id)
next
else
call deleteannounce(clng(idlist))
end if
end if
game_id=request("game_id")
type1=request("type")

if type1<>"" and not isnull(type1) then
sql="select * from Game_cdkey where game_id='"&game_id&"' and type="&type1&" order by id desc"
else
sql="select * from Game_cdkey where game_id='"&game_id&"'order by id desc"
end if
Set rs = YSvoid.Exec(sql,1)

totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"cdkey.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"cdkey.asp"
else
currentPage=1
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"cdkey.asp"
end if
end if
rs.close

set rs=nothing
sub showContent (totalput,MaxPerPage)
%>

<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" >
<form action="cdkey.asp" method="post" name="F">
<input type="hidden" name="game_id" value="<%=game_id%>">
<input type="hidden" name="type" value="<%=type1%>">
<!--DWLayoutTable-->
<tr bgcolor="#1266AE">
<td height="25" colspan="3" valign="middle"><a href="addcdkey.asp?game_id=<%=game_id%>&type=<%=type1%>" target="right"><font color="#FFFFFF"><b>添加CDKEY</b></font></a> | <a href="add_more_cdkey.asp?game_id=<%=game_id%>&type=<%=type1%>" target="right"><font color="#FFFFFF"><b>批量添加CDKEY</b></font></a> | <a href="#" onClick="{if(confirm('确认要全部删除吗?')){location.href='cdkey.asp?del=all&game_id=<%=game_id%>&type=<%=type1%>';}return false;}"><font color="#FFFFFF"><b>删除全部CDKEY</b></font></a></td>
</tr>
<tr>
<td width="31" height="23" align="center" valign="middle">编号</td>
<td width="636" align="center" valign="middle">CDKEY</td>
<td width="60" align="center" valign="middle"><input type='submit' value='删除'></td>
</tr>
<%
do while not rs.eof
%>
<tr>
<td height="25" align="center" valign="middle"><%=rs("id")%></td>
<td align="center" valign="middle"><%=rs("cdkey")%></td>
<td align="center" valign="middle"><input type='checkbox' name='selAnnounce' value='<%=cstr(rs("id"))%>'></td>
</tr>
<%k=k+1
if k>=maxperpage then exit do
rs.movenext
loop
%>
</form>
</table>

<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
if CurrentPage<2 then
response.write "<table border=1 width=100% cellspacing=0 cellpadding=0 bordercolor=#0033FF>"
response.write "<tr height=30>"
response.write "<td align=left>"
response.write "共<font color=#ff6600><b>"&n&"</b></font>页 第<font color=#ff6600><b>"¤tPage&"</b></font>页 共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条相关信息</td>"
response.write "<td align=right>"
response.write "【最前页】【上一页】"
else
response.write "<table border=0 width=100% cellspacing=0 cellpadding=0>"
response.write "<tr height=30>"
response.write "<td align=left>"
response.write "共<font color=#ff6600><b>"&n&"</b></font>页 第<font color=#ff6600><b>"¤tPage&"</b></font>页 共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条相关信息</td>"
response.write "<td align=right>"
response.write "【<a href="&filename&"?page=1&game_id="&game_id&"&txtitle="&request("txtitle")&">最前页</a>】"
response.write "【<a href="&filename&"?page="¤tPage-1&"&game_id="&game_id&"&txtitle="&request("txtitle")&">上一页</a>】 "
end if
if n-currentpage<1 then
response.write "【下一页】【最后页】"
else
response.write "【<a href="&filename&"?page="&(CurrentPage+1)&"&game_id="&game_id&"&txtitle="&request("txtitle")&">"
response.write "下一页</a>】【<a href="&filename&"?page="&n&"&game_id="&game_id&"&txtitle="&request("txtitle")&">最后页</a>】"
end if
response.write "</td>"
response.write "</tr>"
response.write "</table>"
response.write "</form>"
end function
sub deleteannounce(id)
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="delete from Game_cdkey where id="&cstr(id)
conn.execute sql
if err.Number<>0 then
err.clear
response.write "删 除 失 败 !<br>"
end if
End sub
%>
</body>
</html>

...全文
3022 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
hai_men 2010-08-03
  • 打赏
  • 举报
回复
dim totalPut,game_id,type1
dim CurrentPage
dim TotalPages,maxperpage

后面+上
dim idlist
hai_men 2010-08-03
  • 打赏
  • 举报
回复
变量未定义: 'idlist'

加上
dim idlist 试试
w43869121 2010-08-03
  • 打赏
  • 举报
回复
我崩溃啊!!!求解决
w43869121 2010-08-03
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 zqqazhn 的回复:]
引用 5 楼 chinmo 的回复:
哎,还是建议你先把基础看看吧,掌握了再弄吧
全是最基本的错误

正解.数据库连接文件错误
[/Quote]
那怎么办啊?我不懂asp的?
  • 打赏
  • 举报
回复
哎,还是建议你先把基础看看吧,掌握了再弄吧
全是最基本的错误
sy_binbin 2010-08-03
  • 打赏
  • 举报
回复
检查数据库链接文件是否引入

把数据库链接文件中的Option Explicit
这段代码去掉试试

或者
dim conn
zqqazhn 2010-08-03
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 chinmo 的回复:]
哎,还是建议你先把基础看看吧,掌握了再弄吧
全是最基本的错误
[/Quote]
正解.数据库连接文件错误
hanlongppl 2010-08-03
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 chinmo 的回复:]
哎,还是建议你先把基础看看吧,掌握了再弄吧
全是最基本的错误
[/Quote]


这些都是最基本的 不要只顾着写东西看成果
w43869121 2010-08-03
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 hai_men 的回复:]
dim totalPut,game_id,type1
dim CurrentPage
dim TotalPages,maxperpage

后面+上
dim idlist
[/Quote]
又变成
Microsoft VBScript 运行时错误 '800a01a8'

缺少对象: 'Conn'

\Admin\UCCDK\cdkey.asp, line 157
使用XHTML+CSS架构,令页面结构化,节省了静态页面代码的传输,同时也易于修改界面,更符合WEB标准; 论坛采用Cookies、Session、Application等技术对论坛数据进行缓存,减少对数据库的访问,提高论坛的性能。可以承载较多的用户同时访问; 数据分表功能,减轻数据量大的时候访问数据库的负担; 支持多皮肤、风格切换功能; 框架模式+ 平板模式的显示方式,用户可以根据自己的爱好来选择; 优化论坛页面关键字搜索,让论坛更容易被搜索引擎收录; 可扩展插件,为广大朋友提供了一个广阔的论坛服务扩展空间; 站长可以根据不同版面添加不同的顶部广告; 发帖采用HTML+UBB的方式,两种编辑器,互相转换、互相兼容; 一、论坛所需环境 本论坛程序需要服务器至少支持以下组件或者对象: 1)服务器必须支持asp,呵呵,此项必须。 2)Ado2.5或者更高版本,需允许使用Adodb.stream,此项必须。 3)FSO文件操作对象,此项非必须,但可能丧失一部分功能。 4)Vbscript版本5.6以上就是服务器安装了IE5.5或者更高版本,此项非必须,但需要相关补丁。 二、论坛的安装步骤 将论坛代码压缩包解开包,保持文件的相对位置,将解压后得到的全部目录、文件包括所有空目录上传到你的服务器上,论坛基本上就可以使用了,您可以进入后台管理设置一些参数。 默认的管理员帐号:admin 前台密码:admin 后台密码:admin 后台Sql密码:admin 另外重要说明[点击帖子显示] Microsoft VBScript 运行时错误 '800a01f4' 变量未定义: 'Cls_IUBB' \bbs\topic.asp, line 144 此错误不是错误!是本程序不支持本地测试!您只要把程序传到主机空间进去就可以了!没有任何问题! 为了您网站的安全,非一定需要请尽量不要打开上传功能!还有下载使用要修改conn.asp里面的数据库路径(当然了数据名称也要修改)
简约论坛使用XHTML+CSS架构,令页面结构化,节省了静态页面代码的传输,同时也易于修改界面,更符合WEB标准; 论坛采用Cookies、Session、Application等技术对论坛数据进行缓存,减少对数据库的访问,提高论坛的性能。可以承载较多的用户同时访问; 数据分表功能,减轻数据量大的时候访问数据库的负担; 支持多皮肤、风格切换功能; 框架模式+ 平板模式的显示方式,用户可以根据自己的爱好来选择; 优化论坛页面关键字搜索,让论坛更容易被搜索引擎收录; 可扩展插件,为广大朋友提供了一个广阔的论坛服务扩展空间; 站长可以根据不同版面添加不同的顶部广告; 发帖采用HTML UBB的方式,两种编辑器,互相转换、互相兼容; 一、论坛所需环境 本论坛程序需要服务器至少支持以下组件或者对象: 1)服务器必须支持asp,呵呵,此项必须。 2)Ado2.5或者更高版本,需允许使用Adodb.stream,此项必须。 3)FSO文件操作对象,此项非必须,但可能丧失一部分功能。 4)Vbscript版本5.6以上就是服务器安装了IE5.5或者更高版本,此项非必须,但需要相关补丁。   二、论坛的安装步骤 将论坛代码压缩包解开包,保持文件的相对位置,将解压后得到的全部目录、文件包括所有空目录上传到你的服务器上,论坛基本上就可以使用了,您可以进入后台管理设置一些参数。 默认的管理员帐号:admin 前台密码:admin 后台密码:admin 后台Sql密码:admin   另外重要说明[点击帖子显示] Microsoft VBScript 运行时错误 '800a01f4' 变量未定义: 'Cls_IUBB' bbstopic.asp, line 144 此错误不是错误!是本程序不支持本地测试!您只要把程序传到主机空间进去就可以了!没有任何问题! 为了您网站的安全,非一定需要请尽量不要打开上传功能!还有下载使用要修改conn.asp里面的数据库路径(当然了数据名称也要修改) 2015年09月21日发布几个说明: 1、重新改写模板使之能兼容360浏览器、360极速浏览器、火狐浏览器、Google Chrome等主流浏览器 2、删除在线人数状态,删除公告、删除图片友情链接、使论坛更加简约 3、更改论坛为主流字体:微软雅黑

28,406

社区成员

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

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