DataColEnumerator 클래스
This class is used when the ADO enumerator returns a Dataset or Recordset. This enumerator allows you to enumerate over the columns. This class cannot be inherited.
상속 계층
System.Object
Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO.DataColEnumerator
네임스페이스: Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO
어셈블리: Microsoft.SqlServer.ForEachADOEnumerator(Microsoft.SqlServer.ForEachADOEnumerator.dll)
구문
‘선언
Public NotInheritable Class DataColEnumerator _
Implements IEnumerator
‘사용 방법
Dim instance As DataColEnumerator
public sealed class DataColEnumerator : IEnumerator
public ref class DataColEnumerator sealed : IEnumerator
[<SealedAttribute>]
type DataColEnumerator =
class
interface IEnumerator
end
public final class DataColEnumerator implements IEnumerator
DataColEnumerator 유형에서 다음 멤버를 표시합니다.
속성
이름 | 설명 | |
---|---|---|
![]() |
Current | 인프라입니다. Gets the current object in the collection. |
맨 위로 이동
메서드
이름 | 설명 | |
---|---|---|
![]() |
Equals | (Object에서 상속됨) |
![]() |
GetHashCode | (Object에서 상속됨) |
![]() |
GetType | (Object에서 상속됨) |
![]() |
MoveNext | 인프라입니다. Indicates whether the enumerator moves to the next element. |
![]() |
Reset | 인프라입니다. Resets the DataColEnumerator to its default configuration. |
![]() |
ToString | (Object에서 상속됨) |
맨 위로 이동
주의
The members of this class cannot be used directly. This class is used by the foreach keyword (For Each in Visual Basic). The following code example is a piece of a foreach loop showing simply how to use indexing to place a data column into the enumerator and iterate over it.
Vardisp.LockOneForWrite("VariableThatHadIndexSetToMinus1", vars)
DataColEnumerator dcEnum = (DataColEnumerator)vars[0]
foreach (object o in dcEnum)
{
// Do something with o,
// where o is the value of the column, just as you would get
// if you had a variable for a specific index.
}
You must set the index for the variable mapping to -1 to retrieve the entire collection into the variable, instead of retrieving just a column which is based on an index, so then you can access it directly.
스레드 보안
이 유형의 모든 공용 static(Visual Basic에서는 Shared) 멤버는 스레드로부터 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.