The following example uses an SQL statement to retrieve three fields from an Employees table into a Recordset object. It then uses the GetRows method to retrieve as many records as the user specifies, and stores the selected records in a two-dimensional array. Each record is then printed.
See How to Build the DAO Method Samples.
If you have installed the DAO SDK, see InstallDirectory\DAOSDK\SAMPLES\GetRows.cpp.