RecordCount - property of the AdoRecordset object
Note:
Property access for
read only.
In case of an error and also if the number of records check is not supported, returns the
-1 value. This property is not supported, for example, when using the
"forwardonly" cursor, see
PmaAdo.RsOpen method.
Example:
Detects the number of records in the
AdoRecordset object, in the
PmaAdo object (
"/TestAdoDb"), that is currently connected to the database (see the
DbOpen method), by means of the SQL query (
"SELECT * FROM table1").
JavaScriptVBScriptSelect and copy to clipboard
var oDb = pMe.Pm("/TestAdoDb");
var oRs = oDb.RsOpen("table1", "SELECT * FROM table1", "cursor:static;");
var nCount;
if (oRs)
{
nCount = oRs.RecordCount;
// Reading from the property
}
Dim oDb, oRs, nCount
Set oDb = pMe.Pm("/TestAdoDb")
Set oRs = oDb.RsOpen("table1", "SELECT * FROM table1", "cursor:static;")
If Not oRs Is Nothing Then
nCount = oRs.RecordCount
' Reading from the property
End If