DbEnumerator Class

DbEnumerator Class

 

Exposes the GetEnumerator method, which supports a simple iteration over a collection by a .NET Framework data provider.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

System.Object
  System.Data.Common.DbEnumerator

public class DbEnumerator : IEnumerator

NameDescription
System_CAPS_pubmethodDbEnumerator(DbDataReader)

Initializes a new instance of the DbEnumerator class with the give n data reader.

System_CAPS_pubmethodDbEnumerator(DbDataReader, Boolean)

Initializes a new instance of the DbEnumerator class using the specified reader and indicates whether to automatically close the reader after iterating through its data.

System_CAPS_pubmethodDbEnumerator(IDataReader)

Initializes a new instance of the DbEnumerator class using the specified DataReader.

System_CAPS_pubmethodDbEnumerator(IDataReader, Boolean)

Initializes a new instance of the DbEnumerator class using the specified DataReader, and indicates whether to automatically close the DataReader after iterating through its data.

NameDescription
System_CAPS_pubpropertyCurrent

Gets the current element in the collection.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodMoveNext()

Advances the enumerator to the next element of the collection.

System_CAPS_pubmethodReset()

Sets the enumerator to its initial position, which is before the first element in the collection.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The DbEnumerator class is implemented by a .NET Framework data provider to provide data binding support.

By design, the DbEnumerator object is intended for use with only one resultset. For example, if you execute a batch statement containing two SQL SELECT statements that return different schemas, the second statement might not retun the entire schema. To avoid this situation, obtain a DbEnumerator for each resultset, and then call the NextResult method of a .NET Framework data provider DataReader object.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft