We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

DataReader Class

Provides the ability to expose data from any data.

Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

public abstract class DataReader implements IDisposable

The DataReader type exposes the following members.

Protected methodDataReaderClass constructor. Instantiates a nonparameterized instance of the DataReader class.

Public propertyIsClosedRetrieves a Boolean value that indicates whether the specified reader has been closed.
Public propertyItemCountRetrieves the number of items in the current block of data.
Public propertyStatusRetrieves a numerical status code returned by the method currently providing data to the data reader.

Public methodCloseCloses the DataReader instance.
Public methodDispose()Releases managed resources held for the current DataReader instance.
Protected methodDispose(Boolean)Cleans up resources associated with the current DataReader instance, both when the public Dispose method is called and as well as when the object is finalized with a call to the Finalize method.
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeFinalizes the current DataReader instance. (Overrides Object.Finalize().)
Public methodGetBytesRetrieves a specified number of bytes of raw binary data.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetItem(Int32)Retrieves the value of the item at the specified index in the current block of data.
Public methodGetItem(String)Retrieves the value of a data item with the specified name in the current block of data.
Public methodGetItemMaxLengthRetrieves the maximum length, in characters, of data items at the specified index.
Public methodGetItemNameRetrieves the name assigned to the data item at the specified index, if any.
Public methodGetItemTypeRetrieves the data type of a data item item, or items, at the specified index in a specified format.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIsNullItemIndicates whether the data item at the specified index is unspecified, that is, a null reference (Nothing in Visual Basic).
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodNextResultAdvances the data reader to the next result in cases where the reader contains multiple results.
Public methodReadAdvances the reader to the next block of data in cases where the reader contains more than one block.
Public methodTerminateTerminates the data reader immediately, without necessarily returning all of the data nor setting output parameters.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

All base-level data retrieval mechanisms return a DataReader object.

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