GetDataTableBySchemaAction Method
Collapse the table of content
Expand the table of content

DataTableMapping.GetDataTableBySchemaAction Method

Gets the current DataTable for the specified DataSet using the specified MissingSchemaAction value.

Namespace: System.Data.Common
Assembly: System.Data (in system.data.dll)

public DataTable GetDataTableBySchemaAction (
	DataSet dataSet,
	MissingSchemaAction schemaAction
)
public DataTable GetDataTableBySchemaAction (
	DataSet dataSet, 
	MissingSchemaAction schemaAction
)
public function GetDataTableBySchemaAction (
	dataSet : DataSet, 
	schemaAction : MissingSchemaAction
) : DataTable

Parameters

dataSet

The DataSet from which to get the DataTable.

schemaAction

One of the MissingSchemaAction values.

Return Value

A DataTable.

If the DataTable does not exist, the specified MissingSchemaAction is taken.

The following example gets the DataTable for a given DataSet. If there is no current table for the DataSet, a null reference (Nothing in Visual Basic) 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);


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2016 Microsoft