DataTableMapping.GetDataTableBySchemaAction Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current DataTable for the specified DataSet using the specified MissingSchemaAction value.
public:
System::Data::DataTable ^ GetDataTableBySchemaAction(System::Data::DataSet ^ dataSet, System::Data::MissingSchemaAction schemaAction);
public System.Data.DataTable? GetDataTableBySchemaAction (System.Data.DataSet dataSet, System.Data.MissingSchemaAction schemaAction);
public System.Data.DataTable GetDataTableBySchemaAction (System.Data.DataSet dataSet, System.Data.MissingSchemaAction schemaAction);
member this.GetDataTableBySchemaAction : System.Data.DataSet * System.Data.MissingSchemaAction -> System.Data.DataTable
Public Function GetDataTableBySchemaAction (dataSet As DataSet, schemaAction As MissingSchemaAction) As DataTable
Parameters
- schemaAction
- MissingSchemaAction
One of the MissingSchemaAction values.
Returns
A data table.
Examples
The following example gets the DataTable for a given DataSet. If there is no current table for the DataSet, null
is returned. This example assumes that a DataSet and a DataTableMappingCollection collection have been created.
public void CreateDataTable()
{
// ...
// create dataSet and mapping
// ...
DataTable table = mapping.GetDataTableBySchemaAction
(dataSet, MissingSchemaAction.Ignore);
}
Public Sub CreateDataTable()
' ...
' create dataSet and mapping
' ...
Dim table As DataTable = mapping.GetDataTableBySchemaAction _
(dataSet, MissingSchemaAction.Ignore)
End Sub
Remarks
If the DataTable does not exist, the specified MissingSchemaAction is taken.
Applies to
See also
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za