<div class="meta" robots="noindex">

</div>

Method

# ODBCDatabase.NextRecordSet

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `ODBCDatabase.NextRowSet<odbcdatabase.nextrowset>` as a replacement.

</div>

## Description

Determines whether more results are available on a statement containing SELECT, UPDATE, INSERT, or DELETE statements and, if so, initializes processing for those results. This method only affects the most recently opened `RowSet</api/databases/rowset>`. Not all drivers support multiple RecordSets. Returns `True</api/language/true>` if another `RowSet</api/databases/rowset>` is available. You must execute MoveNext on the previous `RowSet</api/databases/rowset>` to advance to the start of the next `RowSet</api/databases/rowset>` after calling <span class="title-ref">NextRecordSet</span>.

## Notes

For a command that can return multiple record sets from the ODBC database and driver, you iterate though each of them using the `RowSet</api/databases/rowset>` class. When you reach the end of a record set, use <span class="title-ref">NextRecordSet</span> to initialize the next ODBC record set for processing by the `RowSet</api/databases/rowset>` class.

## Sample code

``` xojo
' db is a connected database
' rs contains multiple RecordSets from the ODBC database

' First RecordSet
While Not rs.EOF
  ' Process data in 1st record set
  rs.MoveNext
Wend

If db.NextRecordSet Then ' Initialize next ODBC record set (if one is available)
  While Not rs.EOF
    ' Process data in 2nd record set
    rs.MoveNext
  Wend
End If
```

## Compatibility

All project types on all supported operating systems.
