Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - 编程 » SQL Anywhere 数据访问 API » SQL Anywhere .NET 2.0 API 参考 » iAnywhere.Data.SQLAnywhere 命名空间 (.NET 2.0)

 

SADataReader 类

来自查询或存储过程的只读只进结果集。此类无法继承。

语法
Visual Basic

Public NotInheritable Class SADataReader 
  Inherits DbDataReader
  Implements IListSource
C#

public sealed class SADataReader : DbDataReader,
  IListSource
注释

没有用于 SADataReader 的构造函数。要获取 SADataReader 对象,请执行 SACommand:

SACommand cmd = new SACommand(
    "SELECT EmployeeID FROM Employees", conn );
SADataReader reader = cmd.ExecuteReader();

只能在 SADataReader 中向前移动。如果您需要更为灵活的对象来操作结果,请使用 SADataAdapter。

SADataReader 会根据需要检索行,而 SADataAdapter 必须检索结果集的所有行,然后您才能对对象执行任何操作。如果结果集较大,这种差异会使 SADataReader 的响应时间比 SADataAdapter 短很多。

Implements:[external link] IDataReader[external link] IDisposable[external link] IDataRecord[external link] IListSource

有关详细信息,请参见访问和操作数据

另请参见

SADataReader 成员
Depth 属性
FieldCount 属性
HasRows 属性
IsClosed 属性
Item 属性
RecordsAffected 属性
Close 方法
GetBoolean 方法
GetByte 方法
GetBytes 方法
GetChar 方法
GetChars 方法
GetData 方法
GetDataTypeName 方法
GetDateTime 方法
GetDecimal 方法
GetDouble 方法
GetEnumerator 方法
GetFieldType 方法
GetFloat 方法
GetGuid 方法
GetInt16 方法
GetInt32 方法
GetInt64 方法
GetName 方法
GetOrdinal 方法
GetSchemaTable 方法
GetString 方法
GetTimeSpan 方法
GetUInt16 方法
GetUInt32 方法
GetUInt64 方法
GetValue 方法
GetValues 方法
IsDBNull 方法
NextResult 方法
Read 方法
myDispose 方法