Name

NextRecordset (Command Object, Recordset Object) — Set rsObj2 = rsObj1 .NextRecordset( lngRecordsAffected )

Synopsis

Clears the current recordset and retrieves the next recordset. This retrieval occurs by iterating through a series of commands sent in with the call to the Recordset.Open method.

Parameters

rsObj2

The Recordset object variable to which you assign the recordset returned from the NextRecordset method.

rsObj1

The current Recordset object. This Recordset can be the same Recordset as that represented by rsObj2. If this is the case, the current recordset is cleared. Otherwise, you will have two Recordset objects after the method call: one that represents the current Recordset, and one that represents the Recordset returned from the command.

lngRecordsAffected

The number of records cleared if rsObj1 = rsObj2.

Example

<%@ LANGUAGE="VBSCRIPT" %> <% Response.Buffer = True %> <HTML> <HEAD> <TITLE>ADO Examples</TITLE> </HEAD> <BODY> <% ' Include ADOVBS.INC so we can use the ADO constants. %> <!-- #include virtual = "/bc_SSIncludes/adovbs.inc" --> <% ' Instantiate an ADO Connection object. Set objDBConn = Server.CreateObject("ADODB.Connection") ' Construct the connection string for the Connection object. strConn = _ "driver={MyDBType};;uid=sa;pwd=;database=SalesDB" ' Using the connection string, open the connection. objDBConn.Open strConn ' Create a command text string. strCommandText = _ "SELECT * FROM Sales WHERE Price > 70000; " strCommandText = strCommandText & _ "SELECT ...

Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.