I am using Visual Basic 6
I have the following code structure: FUNCNINFO is a structurePublic funcTable() As FUNCNINFO
-----
------
R开发者_开发知识库eDim Preserve funcTable(0 To upsize + ns)
When the value of (upsize + ns) is exceeding 32766,it is giving the runtime overflow error '6' Do you have any idea of the cause and the solution?
VB6's Integer
type is 16 bits so cannot store a value > 32767, its Long
that's the 32 bit integer type so the following will work;
Dim upsize As Long
Dim ns As Long
upsize = 32766
ns = 12345
ReDim Preserve funcTable(0& To upsize + ns)
I discovered that the it was the database which had errors. I did not troubleshoot where exactly the error was but just took a backup before the updated one and it worked ok
精彩评论