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)

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[];

Parameters

dataSet
A DataSet to insert the schema into.
schemaType
One of the SchemaType values that specify how to insert the schema.

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.

Example [Visual Basic]

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

See Also

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