asp:帮我看看这段代码,为什么有错误?请教

来源:百度知道 编辑:UC知道 时间:2024/06/16 13:09:40
错误提示:Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: ''
/shenhe.asp, 第 59 行
if Request.Form("btnSubmit")="提交" then
Response.Write "已提交"
for j=1 to RS.RecordCount (这是59行)
if request.form("asp" & j & "")="on" then
Response.Write "选中第" & j & "行"
end if
next
response.write( request.form("asp1"))
'执行编辑sql
else
if Request.Form("btnSubmit")="驳回" then
Response.Write "已驳回"
'执行删除sql
else
end if
所有的变量都已经定义,表单也都定义了,我要实现的是2个按钮,按不同的按钮执行不同的SQL

for j=1 to RS.RecordCount

试试改成 for j=0 to RS.RecordCount-1

============================================

我确实搞错了 没有仔细看
但是我感觉他的代码我越看越看不懂呢?
你们哪个看得懂 我也想问呢

晕了``~~童子回答的。。

这两句有什么大的区别吗。

RS 上面有这个吗》~~``

if request.form("asp" & j & "")="on" then

if request.form('"asp" & j & ""')="on" then

这里应该是你的RS对象不存在。。你检查一下吧。。。