OleDbErrorCollection 클래스

정의

.NET Framework Data Provider for OLE DB에서 생성된 오류를 모두 수집합니다. 이 클래스는 상속될 수 없습니다.

public ref class OleDbErrorCollection sealed : System::Collections::ICollection
[System.ComponentModel.ListBindable(false)]
public sealed class OleDbErrorCollection : System.Collections.ICollection
[System.ComponentModel.ListBindable(false)]
[System.Serializable]
public sealed class OleDbErrorCollection : System.Collections.ICollection
[<System.ComponentModel.ListBindable(false)>]
type OleDbErrorCollection = class
    interface ICollection
    interface IEnumerable
[<System.ComponentModel.ListBindable(false)>]
[<System.Serializable>]
type OleDbErrorCollection = class
    interface ICollection
    interface IEnumerable
Public NotInheritable Class OleDbErrorCollection
Implements ICollection
상속
OleDbErrorCollection
특성
구현

예제

다음 예제에서는 각 OleDbError 내에서 OleDbErrorCollection 컬렉션입니다.

public void DisplayOleDbErrorCollection(OleDbException exception)
{
   for (int i=0; i < exception.Errors.Count; i++)
   {
      MessageBox.Show("Index #" + i + "\n" +
             "Message: " + exception.Errors[i].Message + "\n" +
             "Native: " + exception.Errors[i].NativeError.ToString() + "\n" +
             "Source: " + exception.Errors[i].Source + "\n" +
             "SQL: " + exception.Errors[i].SQLState + "\n");
   }
}
Public Sub DisplayOleDbErrorCollection(exception As OleDbException)
    Dim i As Integer

    For i = 0 To exception.Errors.Count - 1
        MessageBox.Show("Index #" + i.ToString() + ControlChars.Cr _
           + "Message: " + exception.Errors(i).Message + ControlChars.Cr _
           + "Native: " + exception.Errors(i).NativeError.ToString() + ControlChars.Cr _
           + "Source: " + exception.Errors(i).Source + ControlChars.Cr _
           + "SQL: " + exception.Errors(i).SQLState + ControlChars.Cr)
    Next i
End Sub

설명

이 클래스는 에서 생성 OleDbException 되어 클래스의 인스턴스를 OleDbError 수집합니다. OleDbErrorCollection항상 클래스의 instance OleDbError 하나 이상 포함합니다.

속성

Count

컬렉션의 오류 수를 가져옵니다.

Item[Int32]

지정된 인덱스의 오류를 가져옵니다.

메서드

CopyTo(Array, Int32)

OleDbErrorCollection 내의 지정된 인덱스에서 시작하여 Array의 요소를 Array에 복사합니다.

CopyTo(OleDbError[], Int32)

현재 OleDbErrorCollection의 모든 요소를 지정된 대상 인덱스부터 지정된 OleDbErrorCollection에 복사합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetEnumerator()

.NET Framework 데이터 공급자별로 컬렉션에 대한 단순 반복을 지원하는 GetEnumerator() 메서드를 표시합니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

ICollection.IsSynchronized

이 멤버에 대한 설명은 IsSynchronized를 참조하세요.

ICollection.SyncRoot

이 멤버에 대한 설명은 SyncRoot를 참조하세요.

확장 메서드

Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.

AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.

적용 대상

추가 정보