当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO NextRecordset 方法

ADO
ADO介绍
ADO数据库连接
ADO记录集
ADO显示记录
ADO查询语句
ADO记录排序
ADO添加记录
ADO更新记录
ADO删除记录
ADO演示
ADO提升执行速度
ADO Command对象
ADO Connection对象
ADO Error
ADO Field
ADO Parameter
ADO 属性
ADO Record
ADO Recordset
ADO Stream

ADO NextRecordset 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 413 ::
收藏到网摘: n/a

The NextRecordset method is used to clear the current Recordset object and return the next Recordset object by looping through a series of commands. This method returns a Recordset object.
NextRecordset的作用是:清除当前记录集对象并通过循环执行一系列指令返回下一个记录集。这个方法适用于返回一个Recordset[记录集]对象的。

Use this method to return the results of the next command in a compound command statement or the next result of a stored procedure that returns multiple results. For example, in a compound command statement, like "SELECT * FROM table1;SELECT * FROM table2", the Execute method on a Command or the Open method on a Recordset, will only execute the first command and return the result to a Recordset object. To access the result of the next command in the statement, call the NextRecordset method.
可以使用这个方法返回复合指令语句中下条一指令执行的结果;用于返回程序(该程序是返回多个结果的)执行的下一条结果。举个例子来说,在一个复合指令语句中,像“SELECT * FROM table1;SELECT * FROM table2”语句,一个指令中的Excute方法,或者一个记录集中的Open方法,都将只执行第一条指令,并将结果返回到一个记录集中。你可以使用NextRecordset返回下一指令执行的结果。

If a row-returning command executes successfully but returns no records, the returned Recordset object will be open but empty (BOF and EOF are both True). If a non–row-returning command executes successfully, the returned Recordset object will be closed (State property is adStateClosed). When there are no more results, the Recordset object will be set to Nothing.
如果一个row-returning[返回行]指令已经成功执行,但是并未返回任何记录,那么返回的记录集对象将以空记录集的形式打开(即:BOF和EOF的值都为True);如果一个non–row-returning[非返回行]指令已经成功执行,那么返回的记录集对象将被关闭(state属性的值为adStateClosed)。当不再返回结果时,那么记录集对象将不设置任何值。

Syntax
语法

Set objRecordset2=objRecordset1.NextRecordset(ra)

Note: objRecordset1 and objRecordset2 can be the same Recordset object.
注意:objRecordset1 和 objRecordset2可以是相同的记录集对象


Parameter参数 Description描述
ra Optional. Returns the number of records affected by the operation
可选参数。返回需要操作的记录数量

评论 (0) All

登陆 | 还没注册?