来自查询或存储过程的只读只进结果集。此类无法继承。
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: IDataReader、
IDisposable、
IDataRecord、
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 方法
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |