다음을 통해 공유


DataAdapter.MissingMappingAction 속성

정의

들어오는 데이터와 일치하는 테이블이나 열이 없는 경우 수행할 동작을 결정합니다.

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

속성 값

MissingMappingAction 값 중 하나입니다. 기본값은 Passthrough입니다.

구현

특성

예외

설정된 값이 MissingMappingAction 값 중 하나가 아닌 경우

예제

다음 예제에서는 파생 클래스 OleDbDataAdapter 를 만들고 일부 속성을 설정합니다.

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

설명

속성은 TableMappings 반환된 레코드와 간의 기본 매핑을 DataSet제공합니다.

적용 대상

추가 정보