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

SQL Anywhere 11.0.1 (中文) » UltraLite - .NET 编程 » UltraLite .NET 2.0 API 参考 » ULCommand 类 » ExecuteResultSet 方法

 

ExecuteResultSet(CommandBehavior) 方法

UL Ext.: 执行具有指定命令行为的 SQL SELECT 语句并以 ULResultSet 形式返回结果集。

语法
Visual Basic
Public Function ExecuteResultSet( _
   ByVal cmdBehavior As CommandBehavior _
) As ULResultSet
C#
public ULResultSet ExecuteResultSet(
   CommandBehavior cmdBehavior
);
参数
  • cmdBehavior   用于描述查询结果及其对连接影响的 System.Data.CommandBehavior 标志的逐位组合。UltraLite.NET 仅支持 System.Data.CommandBehavior.Default、System.Data.CommandBehavior.CloseConnection 和 System.Data.CommandBehavior.SchemaOnly 标志。

返回值

ULResultSet 对象形式的结果集。

注释

该语句就是当前的 ULCommand 对象,它具有必需的 ULCommand.CommandText 和任何 ULCommand.Parameters。ULResultSet 对象为可编辑的结果集,您可在其上执行定位更新和删除。要获得完全可编辑的结果集,请使用 ULCommand.ExecuteTable(CommandBehavior) 或 ULDataAdapter。

如果 ULCommand.CommandType 为 System.Data.CommandType.TableDirect,则 ExecuteReader 会执行 ULCommand.ExecuteTable(CommandBehavior) 并返回一个转换为 ULResultSet 的 ULTable。

ULCommand.ExecuteResultSet 支持通过动态 SQL 进行的定位更新和删除。

另请参见