Partager via


AdoDotNetDataReader Class

Provides an implementation of the DataReader class using an implementation of the ADO.NET IDataReader interface.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.DataReader
    Microsoft.VisualStudio.Data.AdoDotNet.AdoDotNetDataReader

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

Syntax

'Declaration
Public Class AdoDotNetDataReader _
    Inherits DataReader
public class AdoDotNetDataReader : DataReader
public ref class AdoDotNetDataReader : public DataReader
type AdoDotNetDataReader =  
    class 
        inherit DataReader 
    end
public class AdoDotNetDataReader extends DataReader

The AdoDotNetDataReader type exposes the following members.

Constructors

  Name Description
Public method AdoDotNetDataReader(IDataReader) Class constructor. Initializes a parameterized instance of the AdoDotNetDataReader class with an implementation of the IDataReader interface.
Public method AdoDotNetDataReader(IDataReader, IDbCommand, array<DataParameter[]) Class constructor. Initializes a parameterized instance of the AdoDotNetDataReader class with an implementation of the IDataReader interface and the command and/or parameters that produced the IDataReader.

Top

Properties

  Name Description
Public property InnerDataReader Retrieves the underlying IDataReader object that is driving the current data reader.
Public property IsClosed Retrieves a Boolean value that indicates whether the specified data reader instance has been closed. (Overrides DataReader.IsClosed.)
Public property ItemCount Retrieves the number of items in the current block of data. (Overrides DataReader.ItemCount.)
Public property Status Retrieves a numerical status code returned by the method currently providing data to the data reader. (Overrides DataReader.Status.)

Top

Methods

  Name Description
Public method Close Closes the current IDataReader object instance. (Overrides DataReader.Close().)
Public method Dispose() Releases managed resources held for the current DataReader instance. (Inherited from DataReader.)
Protected method 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. (Inherited from DataReader.)
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. (Inherited from DataReader.)
Public method GetBytes Retrieves a specified number of bytes of binary data. (Overrides DataReader.GetBytes(Int32, array<Byte[], Int32, Int32).)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetItem(Int32) Retrieves an object instance representing the retrievable item as determined by an index into the current block of data. (Overrides DataReader.GetItem(Int32).)
Public method GetItem(String) Retrieves an object instance representing the retrievable item as specified by name. (Overrides DataReader.GetItem(String).)
Public method GetItemMaxLength Retrieves the maximum length, in characters, of data items at the specified index. (Overrides DataReader.GetItemMaxLength(Int32).)
Public method GetItemName Retrieves the name assigned to the data item at the specified index, if any. (Overrides DataReader.GetItemName(Int32).)
Public method GetItemType Returns the data type of a data item, or items, at the specified index in a specified format. (Overrides DataReader.GetItemType(Int32, DataItemTypeFormat).)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IsNullItem Indicates whether the data item at the specified index is unspecified, that is, nulla null reference (Nothing in Visual Basic). (Overrides DataReader.IsNullItem(Int32).)
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 in cases where the reader contains multiple results. (Overrides DataReader.NextResult().)
Public method Read Advances the reader to the next block of data in cases where the reader contains more than one block. (Overrides DataReader.Read().)
Public method Terminate Terminates the data reader immediately, without necessarily returning all of the data nor setting output parameters. (Overrides DataReader.Terminate().)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

This class provides an implementation based on the IDataReader interface of the DataReader class.

It is unlikely that a data provider will need to override or otherwise modify the behavior of this class; rather, they can simply instantiate it whenever they have an ADO.NET IDataReader and they need to return a DDEX 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.AdoDotNet Namespace

AdoDotNetConnectionSupport