Fills the data set with records and schema from a given source table.
[Visual Basic] Overloads Overridable Public Function FillDataSet( _ ByVal dataSet As DataSet, _ ByVal srcTable As String _ ) As Integer [C#] public virtual int FillDataSet( DataSet dataSet, string srcTable ); [C++] public: virtual int FillDataSet( DataSet* dataSet, String* srcTable ); [JScript] public function FillDataSet( dataSet : DataSet, srcTable : String ) : int;
Exception Type | Condition |
---|---|
FillDataSetRequiresSourceTable | The source table was invalid. |
Notes to Inheritors: When overriding FillDataSet in a derived class, be sure to call the base class's FillDataSet method.
The following example shows how to fill a previously created DataSet with data and the schema when providing a source table.
[Visual Basic]
Function MyFillData(myDataSet As DataSet, sourceTable As String) As DataSet ' fill the data set FillDataSet myDataSet, sourceTable ' 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