Version

GetRecordCount Method (DataSourceAdapter)

Provides the number of records in the data source. This is the total number of records in the data source.
Syntax
'Declaration
 
Public Overridable Function GetRecordCount() As Integer
public virtual int GetRecordCount()

Return Value

Number of records in the data source.
Remarks
Default implementation always returns -1. If a derived class is able to quickly determine number of records the method must be overriden and the number returned. Otherwise there is no need to override the method as the DataRecordCollection will determine the number on its own.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also