我试图用记录集中的项目填充二维数组,但我不断收到以下错误:Microsoft VBScript 运行时错误'800a0009'下标超出范围:'UBound'
我也尝试将 UBound 更改为 Ubound(ProxState,1),但这只是在“For”循环开始后的行上出现以下错误:Microsoft VBScript runtime error '800a0009' Subscript out of range
Dim ProxCount, LastProx
ProxCount = 0
Do While Not objRS.EOF
ProxCount = ProxCount + 1
objRS.MoveNext
Loop
LastProx = ProxCount - 1
objRS.MoveFirst
Dim ProxState
ProxState = Array(LastProx,1)
For i = 0 To UBound(ProxState,0)
ProxState(i,0) = objRS("ProximityName")
ProxState(i,1) = objRS("InState")
Next