Recordset is an array, and more versatile than VBA array. For an example, you can reference by column index or name.
If you want to minimize duration of connection being open. Then you could...
Edit: Though I'd recommend doing computation on SQL side, leveraging more powerful server to do the heavy lifting (I assume data is housed in SQL server). You can do pretty much any folding/aggregation needed in query itself.![]()
Dim ar ar = CVRs.GetRows
Bookmarks