Collection Contents 上一页 下一页 PDF

UltraLite.NET 用户指南

命名空间 iAnywhere.Data.UltraLite

类 ULDataReader


表示 UltraLite 数据库内的一个只读双向游标。游标是来自表的行集或来自查询的结果集的行集。

原型 

' Visual Basic
Public Class ULDataReader
  Inherits MarshalByRefObject

// C#
public class ULDataReader :
  MarshalByRefobject

注释 

ULDataReader 不具有构造函数。要获取 ULDataReader 对象,请执行 类 ULCommand

' Visual Basic
Dim cmd As ULCommand = new ULCommand( _
    "SELECT emp_id FROM employee", conn _
  )
Dim reader As ULDataReader = cmd.ExecuteReader()

// C#
ULCommand cmd = new ULCommand(
    "SELECT emp_id FROM employee", conn
  );
ULDataReader reader = cmd.ExecuteReader();

UL Ext.:ADO.NET 标准仅需要在结果集中进行只进操作,而 ULDataReader 是双向的。当在结果中移动时,ULDataReader 的 Move 方法可以提供充分的灵活性。

ULDataReader 为只读结果集。如果您需要更为灵活的对象来操作结果,请使用 类 ULDataAdapter。ULDataReader 根据需要检索行,而 类 ULDataAdapter 必须检索结果集中的所有行,然后您才能对对象执行任何动作。对于较大的结果集来说,这种差别使得 ULDataReader 的响应时间大大缩短。

UL Ext.:可以使用 方法 GetString 检索 ULDataReader 的所有列。

实现:[external link] IDataReader[external link] IDataRecord[external link] IDisposable


成员 ULDataReader
属性 Depth
属性 FieldCount
属性 IsBOF
属性 IsClosed
属性 IsEOF
属性 Item
属性 Item
属性 RecordsAffected
属性 RowCount
属性 Schema
方法 Close
方法 Dispose
方法 Finalize
方法 GetBoolean
方法 GetByte
方法 GetBytes
方法 GetBytes
方法 GetChar
方法 GetChars
方法 GetData
方法 GetDataTypeName
方法 GetDateTime
方法 GetDecimal
方法 GetDouble
方法 GetFieldType
方法 GetFloat
方法 GetGuid
方法 GetInt16
方法 GetInt32
方法 GetInt64
方法 GetName
方法 GetOrdinal
方法 GetSchemaTable
方法 GetString
方法 GetTimeSpan
方法 GetUInt16
方法 GetUInt32
方法 GetUInt64
方法 GetValue
方法 GetValues
方法 IsDBNull
方法 MoveAfterLast
方法 MoveBeforeFirst
方法 MoveFirst
方法 MoveLast
方法 MoveNext
方法 MovePrevious
方法 MoveRelative
方法 NextResult
方法 Read

Collection Contents 上一页 下一页 PDF