How to populate an array with recordset data
Posted
by Curtis Inderwiesche
on Stack Overflow
See other posts from Stack Overflow
or by Curtis Inderwiesche
Published on 2010-03-08T22:18:37Z
Indexed on
2010/03/08
22:21 UTC
Read the original article
Hit count: 315
I am attempting to move data from a recordset directly into an array. I know this is possible, but specifically I want to do this in VBA as this is being done in MS Access 2003.
Typically I would do something like the following to archive this:
Dim vaData As Variant
Dim rst As ADODB.Recordset
' Pull data into recordset code here...
' Populate the array with the whole recordset.
vaData = rst.GetRows
What differences exist between VB and VBA which makes this type of operation not work?
What about performance concerns? Is this an "expensive" operations?
© Stack Overflow or respective owner