DataTableMapping.GetDataTableBySchemaAction Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient le courant DataTable pour le spécifié DataSet à l’aide de la valeur spécifiée MissingSchemaAction .
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
Paramètres
- schemaAction
- MissingSchemaAction
Une des MissingSchemaAction valeurs.
Retours
Une table de données.
Exemples
L’exemple suivant obtient la valeur d’un DataTable élément donné DataSet. S’il n’existe aucune table actuelle pour le DataSet, null est retourné. Cet exemple suppose qu’une collection et une DataSetDataTableMappingCollection collection ont été créées.
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
Remarques
DataTable S’il n’existe pas, la valeur spécifiée MissingSchemaAction est prise.