Hi,
I've got a bit confused with how to do a dynamic multidimensional array and wondered if anyone could help me out please?
I seem to be Ok with storing values in a single array using this code.....
Dim myIntArray() as Integer
Dim intDimension as Integer
intDimension = 0
(**code for db connect / sql query would be here)
Do While Not rs1.EOF
Redim Preserve myIntArray(intDimension)
myIntArray(intDimension) = rs1!order_number
intDimension = intDimension +1
rs1.MoveNext()
Loop
I would like to store 2 values in my array from the database, for example, two fields like order_number and order_reference, but i'm not really sure how i would do it. I got both confused with how to build the array and also i read something about redim preserve not working on multi-dimensional arrays. I wondered if anyone had done it and/or could give me an idea of the code structure please?
I've got a bit confused with how to do a dynamic multidimensional array and wondered if anyone could help me out please?
I seem to be Ok with storing values in a single array using this code.....
Dim myIntArray() as Integer
Dim intDimension as Integer
intDimension = 0
(**code for db connect / sql query would be here)
Do While Not rs1.EOF
Redim Preserve myIntArray(intDimension)
myIntArray(intDimension) = rs1!order_number
intDimension = intDimension +1
rs1.MoveNext()
Loop
I would like to store 2 values in my array from the database, for example, two fields like order_number and order_reference, but i'm not really sure how i would do it. I got both confused with how to build the array and also i read something about redim preserve not working on multi-dimensional arrays. I wondered if anyone had done it and/or could give me an idea of the code structure please?