a = oRs.GetRows(nRecords, vStart, aFields)
|nRows||[optional] (Long) Specifies the number of returned records. The preset value is -1 = (adGetRowsRest) all remaining records.|
|vStart||[optional] (Variant) Specifies the starting position (Bookmark). If not set, then the starting position will be the position of the current active record. If a valid Bookmark is defined, then it will be used as starting position. It is also possible to use standard numeric constants for defining the start position:|
0 (default) - (adBookmarkCurrent) Current record.
1 - (adBookmarkFirst) First record.
2 - (adBookmarkLast) Last record.
|aFields||[optional] (Variant) A single name, or an array of names or ordinal positions of the fields in the record.|
Dim oDb, oRs, aData
Set oDb = pMe.Pm("/TestAdoDb")
Set oRs = oDb.RsOpen("table1", "SELECT * FROM table1", "cursor:static;")
If Not oRs Is Nothing Then
aData = oRs.GetRows(20, 0, Array("name", "value"))