Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

ADO NextRecordset Method


❮ Complete Recordset Object Reference

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.

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.

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.

Syntax

Set objRecordset2=objRecordset1.NextRecordset(ra)

Note: objRecordset1 and objRecordset2 can be the same Recordset object.


Parameter Description
ra Optional. Returns the number of records affected by the operation

❮ Complete Recordset Object Reference
×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.