DataSourceView.ExecuteInsert(IDictionary) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
개체가 나타내는 데이터 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 삽입 작업 중에 사용되는 이름/값 쌍입니다.
반환
기본 데이터 스토리지에 삽입된 항목 수입니다.
예외
이 ExecuteInsert(IDictionary) 작업은 .에서 DataSourceView지원되지 않습니다.
예제
다음 코드 예제에서는 클래스를 확장 DataSourceView 하는 클래스 속성 및 ExecuteInsert 메서드를 재정의할 CanInsert 수 있는 방법을 보여 줍니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 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 기본 데이터 스토리지에 삽입을 지원하는 경우 메서드를 재정의합니다.