Compartir a través de


DataReader Class

Definition

Provides the ability to expose data from any data.

public ref class DataReader abstract : IDisposable
public abstract class DataReader : IDisposable
type DataReader = class
    interface IDisposable
Public MustInherit Class DataReader
Implements IDisposable
Inheritance
DataReader
Derived
Implements

Constructors

DataReader()

Class constructor. Instantiates a nonparameterized instance of the DataReader class.

Properties

IsClosed

Retrieves a Boolean value that indicates whether the specified reader has been closed.

ItemCount

Retrieves the number of items in the current block of data.

Status

Retrieves a numerical status code returned by the method currently providing data to the data reader.

Methods

Close()

Closes the DataReader instance.

Dispose()

Releases managed resources held for the current DataReader instance.

Dispose(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.

Finalize()

Finalizes the current DataReader instance.

GetBytes(Int32, Byte[], Int32, Int32)

Retrieves a specified number of bytes of raw binary data.

GetItem(Int32)

Retrieves the value of the item at the specified index in the current block of data.

GetItem(String)

Retrieves the value of a data item with the specified name in the current block of data.

GetItemMaxLength(Int32)

Retrieves the maximum length, in characters, of data items at the specified index.

GetItemName(Int32)

Retrieves the name assigned to the data item at the specified index, if any.

GetItemType(Int32, DataItemTypeFormat)

Retrieves the data type of a data item item, or items, at the specified index in a specified format.

IsNullItem(Int32)

Indicates whether the data item at the specified index is unspecified, that is, null.

NextResult()

Advances the data reader to the next result in cases where the reader contains multiple results.

Read()

Advances the reader to the next block of data in cases where the reader contains more than one block.

Terminate()

Terminates the data reader immediately, without necessarily returning all of the data nor setting output parameters.

Applies to