NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DBDataSetCommand.FillDataSetSchema (DataSet, SchemaType, String)

Fills the data set with the schema based upon the chosen SchemaType and a given source table.

[Visual Basic]
Overloads Overridable Public Function FillDataSetSchema( _
   ByVal dataSet As DataSet, _
   ByVal schemaType As SchemaType, _
   ByVal srcTable As String _
) As DataTable ()
[C#]
public virtual DataTable[] FillDataSetSchema(
   DataSet dataSet,
   SchemaType schemaType,
   string srcTable
);
[C++]
public: virtual DataTable* FillDataSetSchema(
   DataSet* dataSet,
   SchemaType schemaType,
   String* srcTable
) [];
[JScript]
public function FillDataSetSchema(
   dataSet : DataSet,
   schemaType : SchemaType,
   srcTable : String
) : DataTable[];

Parameters

dataSet
A DataSet to insert the schema into.
schemaType
One of the SchemaType values that specify how to insert the schema.
srcTable
The name of the source table to be used for table mapping.

Return Value

A DataTable filled with records from the DataSet.

Exceptions

Exception Type Condition
FillDataSetSchemaRequiresSourceTable A source table could not be found to get the schema from.

Remarks

Notes to Inheritors: When overriding FillDataSetSchema in a derived class, be sure to call the base class's FillDataSetSchema method.

Example [Visual Basic]

The following example fills a DataSet with the schema only, while filling a DataTable with records, when provided a source table.

[Visual Basic]

Public Sub MyFillDataTableAndSet(myDataTable   As DataTable, _
         myDataSet     As DataSet, _
         myDataSetComm As ADODataSetCommand,
         mySrcTable    As String)
   ' 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.Source, mySrcTable
   ' Display the contents of myDataTable
   myMsgBox myDataTable.ToString
End Sub

See Also

DBDataSetCommand Class | DBDataSetCommand Members | System.Data.Internal Namespace | DBDataSetCommand.FillDataSetSchema Overload List