Fills the data set with the schema based upon the chosen SchemaType.
[Visual Basic] Overloads Overrides Public Function FillDataSetSchema( _ ByVal dataSet As DataSet, _ ByVal schemaType As SchemaType _ ) As DataTable () [C#] public override DataTable[] FillDataSetSchema( DataSet dataSet, SchemaType schemaType ); [C++] public: override DataTable* FillDataSetSchema( DataSet* dataSet, SchemaType schemaType ) []; [JScript] public override function FillDataSetSchema( dataSet : DataSet, schemaType : SchemaType ) : DataTable[];
A DataTable filled with records from the DataSet.
Exception Type | Condition |
---|---|
FillDataSetSchemaRequiresSourceTable | A source table could not be found to get the schema from. |
The following example fills a DataSet with the schema only, while filling a DataTable with records.
[Visual Basic]
Public Sub MyFillDataTableAndSet(myDataTable As DataTable, _ myDataSet As DataSet, _ myDataSetComm As ADODataSetCommand) ' Create a MessageBox to show the contents of myDataTable in Dim myMsgBox As MessageBox ' Populate myDataTable with records and myDataSet with schema myDataTable = myDataSetComm.FillDataSetSchema myDataSet, _ SchemaType.Mapped ' Display the contents of myDataTable myMsgBox myDataTable.ToString End Sub
DBDataSetCommand Class | DBDataSetCommand Members | System.Data.Internal Namespace | DBDataSetCommand.FillDataSetSchema Overload List