Link to home
Start Free TrialLog in
Avatar of Taras
TarasFlag for Canada

asked on

Table to 2.dimensional Array

I have access table 19 columns and 5950 rows. How I can put it in two dimensionl array. I am pulling data with recordset from database.
thanks
Taras
ASKER CERTIFIED SOLUTION
Avatar of alokanant
alokanant

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dim avarData() as Variant, numrecords as Long
avarData = dynMan.GetRows
numrecords = UBound(avarData, 2) + 1
Avatar of Éric Moreau
The GetRows method is fastest than For loops!!!
Avatar of Taras

ASKER

I am not sure should I put rs.movenext after next col
like it has more sens for me?
Thanks lot.
                rs.movefirst
                for row = 0 to 5949
                 for col = 0 to 18
                 varArr(row,col) = rs.fields(col)
                 
                 next col
                 rs.movenext
                 next row
Avatar of alokanant
alokanant

yes u r correct, place move next after next col. sorry for the mistake.

hth
alok.