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.
On the MSDN Library discIf you have installed the DAO SDK, see Samples\dbdaoInstallDirectory\DAOSDK\SAMPLES\GetRows.cpp.