AdoDotNetSchemaReader 类

为获取封装 DbDataReader 结果集的架构对象的方法。

继承层次结构

Object
  Microsoft.VisualStudio.Data.Framework.DataReader
    Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetSchemaReader

命名空间:  Microsoft.VisualStudio.Data.Framework.AdoDotNet
程序集:  Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)

语法

声明
Public Class AdoDotNetSchemaReader _
    Inherits DataReader
public class AdoDotNetSchemaReader : DataReader
public ref class AdoDotNetSchemaReader : public DataReader
type AdoDotNetSchemaReader =  
    class 
        inherit DataReader 
    end
public class AdoDotNetSchemaReader extends DataReader

AdoDotNetSchemaReader 类型公开以下成员。

构造函数

  名称 说明
公共方法 AdoDotNetSchemaReader(DbDataReader) 初始化 AdoDotNetSchemaReader 类的新实例。数据读取器对象。
公共方法 AdoDotNetSchemaReader(DbDataReader, DbCommand) 初始化 AdoDotNetSchemaReader 类的新实例。数据读取器对象,并且数据命令对象。

页首

属性

  名称 说明
公共属性 Descriptor 获取描述来自数据源的数据的信息。 (继承自 DataReader。)
受保护的属性 HasDescriptor 获取指示数据参数是的值公开其 IVsDataReaderDescriptor 实现。 (重写 DataReader.HasDescriptor。)
公共属性 IsClosed 获取一个值,该值指示 AdoDotNetSchemaReader 是否已关闭。 (重写 DataReader.IsClosed。)
公共属性 ItemCount 获取指定的数据项。整数值包含在当前 AdoDotNetSchemaReader 实例。 (重写 DataReader.ItemCount。)
受保护的属性 SchemaTable 获取表示 DbDataReader 架构传入 AdoDotNetSchemaReader的构造函数的 DataTable 对象。
公共属性 Status 获取数值状态代码返回由当前提供数据的方法。DataReader 对象。 (重写 DataReader.Status。)

页首

方法

  名称 说明
公共方法 Close 关闭当前 AdoDotNetSchemaReader 实例。 (重写 DataReader.Close()。)
公共方法 Dispose() 发布对当前 DataReader 中保存托管资源实例。 (继承自 DataReader。)
受保护的方法 Dispose(Boolean) 清理资源与当前 DataReader 实例,这两个公共 Dispose 方法,在调用时,并且,当使用对象完成调用 Finalize 方法时。 (继承自 DataReader。)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 Finalize 完成当前 DataReader 实例。 (继承自 DataReader。)
公共方法 GetBytes(String, array<Byte[], Int32, Int32) 检索指定的字节数原始的二进制数据。 (继承自 DataReader。)
公共方法 GetBytes(Int32, array<Byte[], Int32, Int32) 字节读取流到缓冲区作为数组,开始一指定的偏移量。 (重写 DataReader.GetBytes(Int32, array<Byte[], Int32, Int32)。)
公共方法 GetHashCode 作为默认哈希函数。 (继承自 Object。)
公共方法 GetItem(Int32) 检索数据项在指定的索引。 (重写 DataReader.GetItem(Int32)。)
公共方法 GetItem(String) 检索具有指定名称的数据项。 (重写 DataReader.GetItem(String)。)
公共方法 GetItemIndex 检索的索引项命名的项的名称,如列的索引。一个给定列的名称。 (重写 DataReader.GetItemIndex(String)。)
公共方法 GetItemMaxLength 检索指定的数据项的长度最大整数值位于指定索引。 (重写 DataReader.GetItemMaxLength(Int32)。)
公共方法 GetItemName 检索字符串数据项的名称位于指定索引。 (重写 DataReader.GetItemName(Int32)。)
公共方法 GetItemType(Int32) 检索数据项或项的数据类型,在默认格式指定的 Default的索引。 (继承自 DataReader。)
公共方法 GetItemType(Int32, DataItemTypeFormat) 检索数据项的数据类型在指定的索引和具有指定格式的项目类型。 (重写 DataReader.GetItemType(Int32, DataItemTypeFormat)。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 IsNullItem(Int32) 检索指示在指定的索引数据项的 Boolean 值是否为 nullnull 引用(在 Visual Basic 中为 Nothing)。 (重写 DataReader.IsNullItem(Int32)。)
公共方法 IsNullItem(String) 检索指示指定的数据项的名称值是否数据项的 Boolean 值是 nullnull 引用(在 Visual Basic 中为 Nothing)。 (重写 DataReader.IsNullItem(String)。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 NextResult 测试是否有另一个结果集,即,如果 true,增加 AdoDotNetSchemaReader。 (重写 DataReader.NextResult()。)
公共方法 Read 测试是否有另一个数据记录,因此,如果 true,增加 AdoDotNetSchemaReader 到下一记录。 (重写 DataReader.Read()。)
公共方法 Terminate DataReader 立即终止对象,而无需返回所有数据或设置输出参数。 (重写 DataReader.Terminate()。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

备注

实现 IVsDataReaderIVsDataReaderDescriptor 接口。 此类采用 DbDataReader 对象作为输入并公开 DbDataReader 对象的架构 DDEX 为 DataReader

数据读取器的格式公开了 DeriveSchema 方法需要的方式,有一组固定的列。 不公开基础 DbDataReader 实例中提供,当调用 GetSchemaTable 方法的信息。

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.VisualStudio.Data.Framework.AdoDotNet 命名空间