DataAdapter.MissingMappingAction DataAdapter.MissingMappingAction DataAdapter.MissingMappingAction DataAdapter.MissingMappingAction Property

Definizione

Determina l'operazione da eseguire quando per i dati in arrivo non è presente una tabella o una colonna corrispondente.Determines the action to take when incoming data does not have a matching table or column.

public:
 property System::Data::MissingMappingAction MissingMappingAction { System::Data::MissingMappingAction get(); void set(System::Data::MissingMappingAction value); };
[System.Data.DataSysDescription("DataAdapter_MissingMappingAction")]
public System.Data.MissingMappingAction MissingMappingAction { get; set; }
member this.MissingMappingAction : System.Data.MissingMappingAction with get, set
Public Property MissingMappingAction As MissingMappingAction

Valore della proprietà

Uno dei valori di MissingMappingAction.One of the MissingMappingAction values. Il valore predefinito è Passthrough.The default is Passthrough.

Implementazioni

Eccezioni

Il valore impostato non è uno dei valori di MissingMappingAction.The value set is not one of the MissingMappingAction values.

Esempi

Nell'esempio seguente viene creata una classe OleDbDataAdapter derivata e vengono impostate alcune delle relative proprietà.The following example creates a derived class, OleDbDataAdapter and sets some of its properties.

// Assumes a valid connection string to an Access database.
static void CreateOleDbAdapter(string connectionString)
{
    OleDbDataAdapter adapter = new OleDbDataAdapter();
    adapter.SelectCommand =
        new OleDbCommand("SELECT * FROM Categories ORDER BY CategoryID");
    adapter.SelectCommand.Connection =
        new OleDbConnection(connectionString);
    adapter.MissingMappingAction = MissingMappingAction.Error;
    adapter.MissingSchemaAction = MissingSchemaAction.Error;
}
' Assumes a valid connection string to an Access database.
Private Sub CreateOleDbDataAdapter(ByVal connectionString As String)
    Dim adapter As New OleDbDataAdapter()
    adapter.SelectCommand = _
       New OleDbCommand("SELECT * FROM Categories ORDER BY CategoryID")
    adapter.SelectCommand.Connection = New OleDbConnection _
       (connectionString)
    adapter.MissingMappingAction = MissingMappingAction.Error
    adapter.MissingSchemaAction = MissingSchemaAction.Error
End Sub

Commenti

La TableMappings proprietà fornisce il mapping master tra i record restituiti DataSete.The TableMappings property provides the master mapping between the returned records and the DataSet.

Si applica a

Vedi anche