Fills the data set with records from between the given bounds and schema from a given source table.
[Visual Basic] Overloads Overridable Public Function FillDataSet( _ ByVal dataSet As DataSet, _ ByVal srcTable As String, _ ByVal startRecord As Integer, _ ByVal maxRecords As Integer _ ) As Integer [C#] public virtual int FillDataSet( DataSet dataSet, string srcTable, int startRecord, int maxRecords ); [C++] public: virtual int FillDataSet( DataSet* dataSet, String* srcTable, int startRecord, int maxRecords ); [JScript] public function FillDataSet( dataSet : DataSet, srcTable : String, startRecord : int, maxRecords : int ) : int;
Exception Type | Condition |
---|---|
FillDataSetRequiresDataSet | The DataSet was invalid. |
FillDataSetRequiresSourceTable | The source table was invalid. |
NotAnAdapterCommand | The ADOConnection could not be found. |
InvalidStartRecord | The startRecord parameter was less than 0. |
InvalidMaxRecords | The maxRecords parameter was a value less than 0. |
FillDataSetRequiresConnection | The ADOConnection was invalid. |
A maxRecords value of 0 gets all records found after the start record.
Notes to Inheritors: When overriding FillDataSet in a derived class, be sure to call the base class's FillDataSet method.
The following example fills a previously created DataSet with the schema and only records 10 through 20 provided the source table exists.
[Visual Basic]
Function MyTwixtTenAndTwenty(myDataSet As DataSet, srcTable As String) As DataSet ' fill the data set FillDataSet myDataSet, srcTable, 10, 20 ' return the data set (or will this only return the schema?) MyFillData = myDataSet.Clone End Function
DBDataSetCommand Class | DBDataSetCommand Members | System.Data.Internal Namespace | DBDataSetCommand.FillDataSet Overload List