nRows | [optional] (Long) Specifies the number of returned records. The default 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 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 specifying 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 column names or ordinal positions of the fields in the record. |
var oDb = pMe.Pm("/TestAdoDb");
var oRs = oDb.RsOpen("", "SELECT * FROM table1", "cursor:static;");
var aData = Pm.CreatePmArray();
if (oRs)
{
oRs.MoveFirst();
aData.LoadFromVbArray(oRs.GetRows(20, 0));
}
var oDb = pMe.Pm("/TestAdoDb");
var oRs = oDb.RsOpen("", "SELECT * FROM table1", "cursor:static;");
var aColNames = Pm.Array1("name", "value");
var aData = Pm.CreatePmArray();
if (oRs)
{
oRs.MoveFirst();
aData.LoadFromVbArray(oRs.GetRows(20, 0, aColNames.SaveToVbArray()));
}
var oDb = pMe.Pm("/TestAdoDb");
var oRs = oDb.RsOpen("", "SELECT * FROM table1", "cursor:static;");
var aColNames = Pm.Array1("name", "value");
if (oRs)
{
oRs.MoveFirst();
var aData = Pm.CallAxMethod("", oRs, "GetRows", 20, 0, aColNames.SaveToVbArray());
}