J
joe
Hello:
I am scratching my head here. I was trying to copy values from a recordset
into an array, but whatever I do,
I keep getting errors. Let me give an example similar to what my code
initially looked like:
'--- sql and recorset creation here ...etc.
Dim MyArray, intTemp
intTemp = 0
Do Until RS.EOF
MyArray(intTemp) = RS("SomeData")
RS.MoveNext
Loop
The above gave me a type mismatch error, without much information.
Apparentely the array didnt like the
variable intTemp. But I thought that maybe its required that I specify the
lenght of the array when decalring it, so
I went:
intTemp = Cint(RS.recordcount - 1)
Dim MyArray(intTemp) '--- hoping that the array would have the same lenght
as the RS
The error I got now is:
Expected integer constant
[sniped reference to specific line in the code]
Dim MyArray(intTemp)
Aren't I making an integer with Cint?
Any help is appreciated.
I am scratching my head here. I was trying to copy values from a recordset
into an array, but whatever I do,
I keep getting errors. Let me give an example similar to what my code
initially looked like:
'--- sql and recorset creation here ...etc.
Dim MyArray, intTemp
intTemp = 0
Do Until RS.EOF
MyArray(intTemp) = RS("SomeData")
RS.MoveNext
Loop
The above gave me a type mismatch error, without much information.
Apparentely the array didnt like the
variable intTemp. But I thought that maybe its required that I specify the
lenght of the array when decalring it, so
I went:
intTemp = Cint(RS.recordcount - 1)
Dim MyArray(intTemp) '--- hoping that the array would have the same lenght
as the RS
The error I got now is:
Expected integer constant
[sniped reference to specific line in the code]
Dim MyArray(intTemp)
Aren't I making an integer with Cint?
Any help is appreciated.