HOME

ADO Tutorial
ADO HOME
ADO Intro
ADO Connect
ADO Recordset
ADO Display
ADO SQL
ADO Demo

ADO Objects
ADO Command
ADO Connection
ADO Error
ADO Field
ADO Parameter
ADO Property
ADO Record
ADO Recordset
ADO Stream

Examples
ADO Examples
Proposal Kit
Please visit our sponsors !

The NextRecordset Method

Back

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


Back

Jump to: Top of Page or HOME or Printer Friendly Printer friendly page


Search W3Schools:


What Others Say About Us

Does the world know about us? Check out these places:

Dogpile Alta Vista MSN Google Excite Lycos Yahoo Ask Jeeves


We Help You For Free. You Can Help Us!


W3Schools is for training only. We do not warrant its correctness or its fitness for use. The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2002 by Refsnes Data. All Rights Reserved


Validate How we converted to XHTML Validate

ASPHits
Active Server Pages Resource Web Site


Your own Web Site?

Read W3Schools
Hosting Tutorial



$15 Domain Name
Registration
Save $20 / year!



Advertise
at W3Schools

Only 0.5 CPM



SELECTED LINKS

University Online
Master Degree
Bachelor Degree


Web Software

The Future of
Web Development


Jobs and Careers

Web Security
Web Statistics
Web Standards


PARTNERS

W3Schools
TopXML
VisualBuilder
XMLPitstop
DevelopersDex
DevGuru
Programmers Heaven
The Code Project
Tek Tips Forum
ZVON.ORG
TopXML Search