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) » SACommand 类 » ExecuteReader 方法

 

ExecuteReader(CommandBehavior) 方法

执行返回结果集的 SQL 语句。

语法
Visual Basic

Public Function ExecuteReader( _
   ByVal behavior As CommandBehavior _
) As SADataReader
C#

public SADataReader ExecuteReader(
   CommandBehavior behavior
);
参数
  • behavior   CloseConnection、Default、KeyInfo、SchemaOnly、SequentialAccess、SingleResult 或 SingleRow 之一。

    有关此参数的详细信息,请参见 .NET Framework 文档中的 "CommandBehavior 枚举"。

返回值

作为 SADataReader 对象的结果集。

注释

该语句是当前 SACommand 对象,视需要带有 CommandText 和 Parameters。SADataReader 对象是只读的只进结果集。对于可修改的结果集,请使用 SADataAdapter。

另请参见