GetRows Method

The GetRows method returns the number of records, gotten as the result of an SQL query.

Applies to objects: Recordset.

Syntax

[[Let] RetVal = ] object.GetRows()

The GetRows method syntax has these parts:

Part Description
object Required. A reference to an instance of the object.
RetVal Optional. A Long type variable, that gets the number of records.

Remarks

In some cases it's not possible to determine the number of records in the resulting multitude. The majority of data sources don't let determine the size of the resulting multitude when performing the SELECT operation, but determine the size successfully after UPDATE, DELETE, INSERT. If the number of strings is unknown, the GetRows method returns -1.

Example

.......

 

See Also

Recordset Object, RowsAffected Method.