DataColEnumerator Class
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.
네임스페이스: Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO
어셈블리: Microsoft.SqlServer.ForEachADOEnumerator (in microsoft.sqlserver.foreachadoenumerator.dll)
구문
‘선언
Public NotInheritable Class DataColEnumerator
Implements IEnumerator
public sealed class DataColEnumerator : IEnumerator
public ref class DataColEnumerator sealed : IEnumerator
public final class DataColEnumerator implements IEnumerator
public final class DataColEnumerator implements IEnumerator
주의
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.
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO.DataColEnumerator
스레드 보안
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
DataColEnumerator Members
Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO Namespace