为什么我的语句总是不执行?
下面的代码总是提示
Microsoft VBScript 运行时错误 错误 '800a0009'
下标越界: 'i'
/rlzy/xfbc.asp,行61
if request.form("tj")="提交" then
xf=request.form("xf")
array2=split(xf,", ")
max2=ubound(array2)
if max2>=0 then
i=0
Set conn88=Server.CreateObject("ADODB.Connection")
conn88.Open "Driver=SQL Server;Server=192.169.5.25;UID=hgx;PWD=hgx;Database=rlzy"
Set myrst88=Server.CreateObject("ADODB.Recordset")
sql88="select * from 培训记录表 where 课程名称 like '%" & kcmc & "%'"
sql88=sql88 & "and 时间='" & date1 & "' and 截止时间='" & date2 & "' and 所在公司='" & gs & "'"
myrst88.open sql88,conn88,3,3
do while not myrst88.eof
(下面语句为第61行)
sql ="update 培训记录表 set 学费='" & array2(i) & "' where 编号='" & myrst88("编号") & "'"
conn88.execute(sql)
i=i+1
myrst88.movenext
loop
myrst88.close
set myrst88=nothing
conn88.close
set conn88=nothing
end if
end if