Classe FieldColEnumerator
This class is used when the ADO enumerator returns a Dataset or Recordset. This enumerator allows you to enumerate over the fields. This class cannot be inherited.
Gerarchia di ereditarietà
System.Object
Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO.FieldColEnumerator
Spazio dei nomi Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO
Assembly: Microsoft.SqlServer.ForEachADOEnumerator (in Microsoft.SqlServer.ForEachADOEnumerator.dll)
Sintassi
'Dichiarazione
Public NotInheritable Class FieldColEnumerator _
Implements IEnumerator
'Utilizzo
Dim instance As FieldColEnumerator
public sealed class FieldColEnumerator : IEnumerator
public ref class FieldColEnumerator sealed : IEnumerator
[<SealedAttribute>]
type FieldColEnumerator =
class
interface IEnumerator
end
public final class FieldColEnumerator implements IEnumerator
Nel tipo FieldColEnumerator sono esposti i membri seguenti.
Proprietà
Nome | Descrizione | |
---|---|---|
![]() |
Current | Infrastruttura. Gets the current object in the collection. |
In alto
Metodi
Nome | Descrizione | |
---|---|---|
![]() |
Equals | Ereditato da Object. |
![]() |
GetHashCode | Ereditato da Object. |
![]() |
GetType | Ereditato da Object. |
![]() |
MoveNext | Infrastruttura. Indicates whether the enumerator moves to the next element. |
![]() |
Reset | Infrastruttura. Resets the DataColEnumerator to its default configuration. |
![]() |
ToString | Ereditato da Object. |
In alto
Osservazioni
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 field into the enumerator and iterate over it.
Vardisp.LockOneForWrite("VariableThatHadIndexSetToMinus1", vars)
FieldColEnumerator fEnum = (FieldColEnumerator)vars[0]
foreach (object o in fEnum)
{
// 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.
Protezione dei thread
I membri static (Shared in Visual Basic) pubblici di questo tipo sono affidabili. Non è invece garantita la sicurezza dei membri dell'istanza.
Vedere anche
Riferimento
Spazio dei nomi Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO