问题描述
我在下面的VB 6.0中附加了代码:
I have attached a code in VB 6.0 below :
If iFrameIndex = 29 Then
With structAccountDetails.seqTaxLicType (iIndex).seqVehicleDetails(0)
mskBondCompany.Text = EMPTYBONDCOMPANY
mskBondAmountMFT.Text = "";
mskBondCompany.SelText = .strVehicleNo
mskBondAmountMFT.SelText = .mnyStateTax
If .mnyCityTax = "0" Then
txtBondNumber(1).Text = "";
Else
txtBondNumber(1).Text = .mnyCityTax
End If
txtPermitNumber(1).Text = .dtEnteredDate
End With
End If
调试时,错误下标超出范围.请联系系统管理员"出现在行中:
使用structAccountDetails.seqTaxLicType(iIndex).seqVehicleDetails(0)
然后将其移至ErrorHandler函数,将其声明为致命错误.
在此模块以及本模块的其他部分,我将mnyCityTax变量从Integer更改为String.我更改了Middleware C ++代码中的所有内容,并更改了数据库,以使mnyCityTax的相应条目以字符串形式而不是以Integer形式进入相关表.
但是,当我单击在VB中调用mnyCity Tax变量的按钮时,出现下标超出范围.请与系统管理员联系"错误.
模块中与
有关的其他部分
While debug , the error "Subscript Out Of Range.Please Contact System Administrator" comes in the line :
With structAccountDetails.seqTaxLicType(iIndex).seqVehicleDetails(0)
and then it moves over to the ErrorHandler function stating it as a fatal error.
Here and in other parts of this module, i have changed the mnyCityTax variable to String from Integer. I have changed everything in the Middleware C++ code as well as made changes in the database such that the corresponding entry for mnyCityTax goes into the relevant table as a string and not as an Integer.
But , i recieve a "Subscript Out Of Range.Please Contact System Administrator" Error while i click on the button that calls the mnyCity Tax variable in VB.
Other parts of the module concerning
1)ReDim structAccountDetails.seqTaxLicType(-1 To -1)
2)structAccountDetails.seqTaxLicType = structAccountDetailsUpdT.seqTaxLicType
ReDim Preserve structAccountDetails.seqTaxLicType(UBound(structAccountDetails.seqTaxLicType) + 1)
声明为:
The declaration stands as :
Dim structAccountDetails As TAXMANTRABROKERLib.iAccountDetailsRow
声明有什么关系吗?以前,该表在列为Integer的情况下运行良好.我刚刚将表中的列类型更改为varchar.但是显示错误.
有人可以帮我吗?
我在一个项目的中间.
在此先感谢
Is there something to do with the declaration? Previously, it was working fine with the table having the column as Integer. I have just changed the column type in the table as varchar. But it shows error.
Can somebody help me?
I am in the middle of a project.
Thanks in advance
推荐答案
structAccountDetails.seqTaxLicType(iIndex)
或
or
structAccountDetails.seqTaxLicType (iIndex).seqVehicleDetails(0)
有价值.似乎任何一个都没有任何物品.
(即)长度= 0
has values. It seems like either one does not have any item.
(i.e) Length = 0
这篇关于下标超出范围错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!