DataReader Class

Provides the ability to expose data from any data source.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.Framework.DataReader
    Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetReader
    Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetSchemaReader
    Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetTableReader

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

Syntax

'Declaration
Public MustInherit Class DataReader _
    Implements IVsDataReader, IDisposable, IVsDataReaderDescriptor
public abstract class DataReader : IVsDataReader, 
    IDisposable, IVsDataReaderDescriptor
public ref class DataReader abstract : IVsDataReader, 
    IDisposable, IVsDataReaderDescriptor
[<AbstractClass>]
type DataReader =  
    class 
        interface IVsDataReader 
        interface IDisposable 
        interface IVsDataReaderDescriptor 
    end
public abstract class DataReader implements IVsDataReader, IDisposable, IVsDataReaderDescriptor

The DataReader type exposes the following members.

Constructors

  Name Description
Protected method DataReader Initializes a new instance of the DataReader class.

Top

Properties

  Name Description
Public property Descriptor Gets information that describes the data from a data source.
Protected property HasDescriptor Gets a value indicating whether the data reader exposes its IVsDataReaderDescriptor implementation through the Descriptor property.
Public property IsClosed Gets a Boolean value that indicates whether the specified reader has been closed.
Public property ItemCount Gets the number of items in the current block of data.
Public property Status Gets a numerical status code returned by the method currently providing data to the data reader.

Top

Methods

  Name Description
Public method Close Closes the DataReader instance.
Public method Dispose() Releases managed resources held for the current DataReader instance.
Protected method Dispose(Boolean) Cleans up resources associated with the current DataReader instance, both when the public Dispose method is called and when the object is finalized with a call to the Finalize method.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Finalizes the current DataReader instance. (Overrides Object.Finalize().)
Public method GetBytes(Int32, array<Byte[], Int32, Int32) Retrieves a specified number of bytes of raw binary data.
Public method GetBytes(String, array<Byte[], Int32, Int32) Retrieves a specified number of bytes of raw binary data.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetItem(Int32) Retrieves the value of the item at the specified index in the current block of data.
Public method GetItem(String) Retrieves the value of a data item with the specified name in the current block of data.
Public method GetItemIndex Returns the index corresponding to the specified item name in the block of data.
Public method GetItemMaxLength Retrieves the maximum length, in characters, of data items at the specified index.
Public method GetItemName Retrieves the name assigned to the data item at the specified index, if any.
Public method GetItemType(Int32) Retrieves the data type of a data item, or items, at the specified index for the default format Default.
Public method GetItemType(Int32, DataItemTypeFormat) Retrieves the data type of a data item, or items, at the specified index in a specified format.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IsNullItem(Int32) Indicates whether the data item at the specified index is unspecified, that is, nulla null reference (Nothing in Visual Basic).
Public method IsNullItem(String) Indicates whether the value of the given data item is unspecified, that is, nulla null reference (Nothing in Visual Basic).
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method NextResult Advances the data reader to the next result set in cases where the reader contains multiple result sets.
Public method Read Advances the reader to the next block of data in cases where the reader contains more than one block of data.
Public method Terminate Terminates the data reader immediately, without necessarily returning all of the data or setting output parameters.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

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

Thread Safety

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

See Also

Reference

Microsoft.VisualStudio.Data.Framework Namespace

AdoDotNetDataReader