OdbcDataReader 成员

提供从数据源读取数据行的只进流的方法。无法继承此类。

下表列出了由 OdbcDataReader 类型公开的成员。

公共属性

  名称 说明
Public property Depth 已重写。获取一个值,用于指示当前行的嵌套深度。
Public property FieldCount 已重写。获取当前行中的列数。
Public property HasRows 已重写。获取一个值,用于指示 OdbcDataReader 是否包含一行或多行。
Public property IsClosed 已重写。指示 OdbcDataReader 是否关闭。
Public property Item 已重载。 已重写。获取以本机格式表示的列的值。
Public property RecordsAffected 已重写。通过执行 SQL 语句获取更改、插入或删除的行数。
Public property VisibleFieldCount  获取 DbDataReader 中未隐藏的字段的数目。(从 DbDataReader 继承。)

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Close 已重写。 关闭 OdbcDataReader 对象。
Public method CreateObjRef  创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。 (从 MarshalByRefObject 继承。)
Public method Dispose  释放此 DbDataReader 使用的资源。 (从 DbDataReader 继承。)
Public method Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method GetBoolean 已重写。 获取指定列的布尔值形式的值。
Public method GetByte 已重写。 获取指定列的字节形式的值。
Public method GetBytes 已重写。 从指定的列偏移量将字节流作为数组从特定的缓冲区偏移量开始读入缓冲区。
Public method GetChar 已重写。 获取指定列的字符形式的值。
Public method GetChars 已重写。 从指定的列偏移量将字符流作为数组从特定的缓冲区偏移量开始读入缓冲区。
Public method GetData  返回被请求的列序号的 DbDataReader 对象。 (从 DbDataReader 继承。)
Public method GetDataTypeName 已重写。 获取源数据类型的名称。
Public method GetDate 获取指定列的 DateTime 对象形式的值。
Public method GetDateTime 已重写。 获取指定列的 DateTime 对象形式的值。
Public method GetDecimal 已重写。 获取指定列的 Decimal 对象形式的值。
Public method GetDouble 已重写。 获取指定列的双精度浮点数形式的值。
Public method GetEnumerator 已重写。 返回一个 IEnumerator,可用于循环访问数据读取器中的行。
Public method GetFieldType 已重写。 获取是对象的数据类型的 Type
Public method GetFloat 已重写。 获取指定列的单精度浮点数形式的值。
Public method GetGuid 已重写。 获取指定列的值作为全局唯一标识符 (GUID)。
Public method GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method GetInt16 已重写。 获取指定列的 16 位有符号整数形式的值。
Public method GetInt32 已重写。 获取指定列的 32 位有符号整数形式的值。
Public method GetInt64 已重写。 获取指定列的 64 位有符号整数形式的值。
Public method GetLifetimeService  检索控制此实例的生存期策略的当前生存期服务对象。 (从 MarshalByRefObject 继承。)
Public method GetName 已重写。 获取指定列的名称。
Public method GetOrdinal 已重写。 在给定列名称的情况下获取列序号。
Public method GetProviderSpecificFieldType  返回指定列的提供程序特定的字段类型。 (从 DbDataReader 继承。)
Public method GetProviderSpecificValue  获取指定列的作为 Object 实例的值。 (从 DbDataReader 继承。)
Public method GetProviderSpecificValues  获取集合中当前行的所有提供程序特定的属性列。 (从 DbDataReader 继承。)
Public method GetSchemaTable 已重写。 返回一个 DataTable,它描述 OdbcDataReader 的列元数据。
Public method GetString 已重写。 获取指定列的 String 形式的值。
Public method GetTime 获取指定列的 TimeSpan 对象形式的值。
Public method GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method GetValue 已重写。 获取以本机格式表示的指定序号处的列的值。
Public method GetValues 已重写。 获取当前行中的所有属性列。
Public method InitializeLifetimeService  获取控制此实例的生存期策略的生存期服务对象。 (从 MarshalByRefObject 继承。)
Public method IsDBNull 已重写。 获取一个值,该值指示列中是否包含不存在的或已丢失的值。
Public method NextResult 已重写。 读取批处理 SQL 语句的结果时,使 OdbcDataReader 前进到下一个结果。
Public method Read 已重写。 使 OdbcDataReader 前进到下一条记录。
Public method Static ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

受保护的方法

  名称 说明
Protected method Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method MemberwiseClone  已重载。 (从 MarshalByRefObject 继承。)

页首

显式接口实现

  名称 说明
Explicit interface implementation Method System.Collections.IEnumerable.GetEnumerator  
Explicit interface implementation Method System.IDisposable.Dispose  

页首

请参见

参考

OdbcDataReader 类
System.Data.Odbc 命名空间

其他资源

使用 DataReaders