Used to copy either all or a specified number of records into a two-dimensional array.
The GetRows method is used to copy records from a Recordset object into a variant
that is a two-dimensional array.
The variant array is automatically dimensioned (sized) to fit the requested number of
columns and rows.
To allow backwards compatibility with earlier versions of ADO, the columns are placed in the
first dimension of the array and the rows are placed in the second dimension.
In comparison, the similar GetString method returns a specified Recordset
as a string.
There are three optional parameters.
GetRowsOptionEnum Constants
Note as of ADO version 2.5, there is only one value in this table.
Constant | Value | Description |
---|---|---|
adGetRowsRest | -1 | Default, retrieves all records from the designated starting point to the end of the records |
Constant | Value | Description |
---|---|---|
adBookmarkCurrent | 0 | Default, start search at current record |
adBookmarkFirst | 1 | Start search at first record |
adBookmarkLast | 2 | Start search at last record |
avarGetRowsArray = objRecordset.GetRows(intNumRows, BkMrk)