DataSourceView.ExecuteInsert(IDictionary) 메서드

정의

DataSourceView 개체가 나타내는 데이터 목록에서 삽입 작업을 수행합니다.

protected:
 virtual int ExecuteInsert(System::Collections::IDictionary ^ values);
protected virtual int ExecuteInsert (System.Collections.IDictionary values);
abstract member ExecuteInsert : System.Collections.IDictionary -> int
override this.ExecuteInsert : System.Collections.IDictionary -> int
Protected Overridable Function ExecuteInsert (values As IDictionary) As Integer

매개 변수

values
IDictionary

삽입 작업을 수행하는 동안 사용되는 이름/값 쌍의 IDictionary입니다.

반환

Int32

내부 데이터 스토리지에 삽입된 항목의 수입니다.

예외

ExecuteInsert(IDictionary)DataSourceView 작업을 지원하지 않는 경우

예제

다음 코드 예제에서는 방법을 확장 하는 클래스를 DataSourceView 클래스에서 재정의할 수는 CanInsert 속성 및 ExecuteInsert 메서드. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 DataSourceView 클래스입니다.

// The CsvDataSourceView does not currently
// permit insertion of a new record. You can
// modify or extend this sample to do so.
public override bool CanInsert {
    get {
        return false;
    }
}
protected override int ExecuteInsert(IDictionary values)
{
    throw new NotSupportedException();
}
' The CsvDataSourceView does not currently
' permit insertion of a new record. You can
' modify or extend this sample to do so.
Public Overrides ReadOnly Property CanInsert() As Boolean
   Get
      Return False
   End Get
End Property

Protected Overrides Function ExecuteInsert(values As IDictionary) As Integer
   Throw New NotSupportedException()
End Function 'ExecuteInsert

설명

데이터 바인딩된 컨트롤을 확인할 수 있습니다 있는지 여부를 ExecuteInsert 작업은 검색 하 여 데이터 소스 컨트롤에서 지원 합니다 DataSourceView 를 사용 하 여 개체를 GetView 메서드를 검사를 CanInsert 속성.

values 매개 변수는 데이터 열 또는 필드와 해당 값 삽입을 나타내는 이름/값 쌍의 집합입니다.

참고

합니다 DataSourceView 클래스의 기본 구현은 throw 하는 것을 NotSupportedException 예외입니다. DataSourceView 클래스를 확장할 때 클래스가 기본 데이터 스토리지에 삽입을 지원하는 경우 ExecuteInsert 클래스를 재정의합니다.

적용 대상

추가 정보