RecordCount - property of object AdoRecordset

Returns the number of records in the AdoRecordset object.
RecordCount As Long
n = oRs.RecordCount
Property access for read only. In case of error and 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 the RsOpen method.
See also:
Detects the number of records in the AdoRecordset object, over the PmAdo object ("/TestAdoDb"), that is currently connected to the database (see DbOpen), by the SQL query ("SELECT * FROM table1").
VBScriptSelect and copy to clipboard

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
End If
PROMOTIC 8.3.27 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice