Fill(DataSet, int, int, string) Method

Syntax:

public int Fill(DataSet dataSet, int startRecord, int maxRecords, string sourceTable)

Description:

Adds or refreshes rows in the DataSet for the DataTable named sourceTable starting at record startRecord and continuing through maxRecords.

Parameters:

dataSet

Type: System.Data.DataSet

The DataSet to fill with records and, if necessary, schema.

startRecord

Type: System.Int32

The zero-based record number to start with.

maxRecords

Type: System.Int32

The maximum number of records to retrieve.

sourceTable

Type: System.String

The name of the DataTable to fill within the DataSet.

Return Value:

Type: System.Int32

The number of rows successfully added to or refreshed in the DataSet.

Exceptions:

Exception Condition
SystemException The specified source table is invalid.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.Fill(DataSet)