DataAdapter.MissingSchemaAction Özellik

Tanım

Mevcut DataSet şema gelen verilerle eşleşmediğinde yapılacak eylemi belirler.

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

Özellik Değeri

Değerlerden MissingSchemaAction biri. Varsayılan değer: Add.

Uygulamalar

Öznitelikler

Özel durumlar

Değer kümesi değerlerden MissingSchemaAction biri değildir.

Örnekler

Aşağıdaki örnek türetilmiş bir sınıf OleDbDataAdapter oluşturur ve bazı özelliklerini ayarlar.

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

Şunlara uygulanır

Ayrıca bkz.