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.
Hiérarchie d'héritage
System. . :: . .Object
Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO..::..FieldColEnumerator
Espace de noms : Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO
Assembly : Microsoft.SqlServer.ForEachADOEnumerator (en Microsoft.SqlServer.ForEachADOEnumerator.dll)
Syntaxe
'Déclaration
Public NotInheritable Class FieldColEnumerator _
Implements IEnumerator
'Utilisation
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
Le type FieldColEnumerator expose les membres suivants.
Méthodes
Nom | Description | |
---|---|---|
Equals | (hérité de Object.) | |
Finalize | (hérité de Object.) | |
GetHashCode | (hérité de Object.) | |
GetType | (hérité de Object.) | |
MemberwiseClone | (hérité de Object.) | |
MoveNext | Infrastructure. | |
Reset | Infrastructure. | |
ToString | (hérité de Object.) |
Haut de la page
Notes
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.
Sécurité des threads
Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.