Compartir a través de


DataAdapter.MissingMappingAction Propiedad

Definición

Determina la acción que hay que llevar a cabo si los datos entrantes no tienen una tabla o una columna coincidente.

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

Valor de propiedad

Uno de los valores de MissingMappingAction. De manera predeterminada, es Passthrough.

Implementaciones

Atributos

Excepciones

El valor establecido no es ninguno de los valores de MissingMappingAction.

Ejemplos

En el ejemplo siguiente se crea una clase OleDbDataAdapter derivada y se establecen algunas de sus propiedades.

// 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

Comentarios

La TableMappings propiedad proporciona la asignación principal entre los registros devueltos y .DataSet

Se aplica a

Consulte también