DataReader 类

定义

表示 IVsDataReader 和 IVsDataReaderDescriptor 接口的实现。

public ref class DataReader abstract : IDisposable, Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataReader, Microsoft::VisualStudio::Data::Services::SupportEntities::IVsDataReaderDescriptor
public abstract class DataReader : IDisposable, Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReader, Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataReaderDescriptor
type DataReader = class
    interface IVsDataReader
    interface IDisposable
    interface IVsDataReaderDescriptor
Public MustInherit Class DataReader
Implements IDisposable, IVsDataReader, IVsDataReaderDescriptor
继承
DataReader
派生
实现

构造函数

DataReader()

初始化 DataReader 类的新实例。

属性

Descriptor

获取描述数据源中的数据的信息。

HasDescriptor

获取一个值,该值指示数据读取器是否通过 Descriptor 属性公开其IVsDataReaderDescriptor实现。

IsClosed

获取一个布尔值,该值指示指定的读取器是否已关闭。

ItemCount

获取当前数据块中的项数。

Status

获取当前向数据读取器提供数据的 方法返回的数字状态代码。

方法

Close()

关闭 DataReader 实例。

Dispose()

释放为当前 DataReader 实例保留的托管资源。

Dispose(Boolean)

在调用公共Dispose()方法时以及通过调用 Finalize() 方法完成对象时,清除与当前DataReader实例关联的资源。

Finalize()

完成当前 DataReader 实例。

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

检索指定数量的原始二进制数据。

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

检索指定数量的原始二进制数据。

GetItem(Int32)

检索当前数据块中位于指定索引处的项的值。

GetItem(String)

检索当前数据块中具有指定名称的数据项的值。

GetItemIndex(String)

返回与数据块中指定项名称对应的索引。

GetItemMaxLength(Int32)

检索指定索引处数据项的最大长度(以字符为单位)。

GetItemName(Int32)

检索分配给指定索引处的数据项的名称(如果有)。

GetItemType(Int32)

检索默认格式 Default的指定索引处的数据项或项的数据类型。

GetItemType(Int32, DataItemTypeFormat)

以指定格式检索指定索引处的数据项或项的数据类型。

IsNullItem(Int32)

指示指定索引处的数据项是否未指定,即 null。

IsNullItem(String)

指示给定数据项的值是否未指定,即 null。

NextResult()

在读取器包含多个结果集的情况下,将数据读取器前进到下一个结果集。

Read()

在读取器包含多个数据块的情况下,将读取器推进到下一个数据块。

Terminate()

立即终止数据读取器,而无需返回所有数据或设置输出参数。

适用于