Oracle8i JDBC Developer's Guide and Reference
Release 2 (8.1.6)

A81354-01

Library

Product

Contents

Index

Prev  Chap Top Next

Refetching Rows

The result set refreshRow() method is supported for some types of result sets for refetching data. This consists of going back to the database to re-obtain the database rows that correspond to N rows in the result set, starting with the current row, where N is the fetch size (described above in "Fetch Size"). This lets you see the latest updates to the database that were made outside of your result set, subject to the isolation level of the enclosing transaction.

Because refetching re-obtains only rows that correspond to rows already in your result set, it does nothing about rows that have been inserted or deleted in the database since the original query. It ignores rows that have been inserted, and rows will remain in your result set even after the corresponding rows have been deleted from the database. When there is an attempt to refetch a row that has been deleted in the database, the corresponding row in the result set will maintain its original values.

Following is the refreshRow() method signature:

You must be at a valid current row when you call this method, not outside the row bounds and not at the insert-row.

With the 8.1.6 release, the refreshRow() method is supported for the following result set categories:

Oracle JDBC might support additional result set categories in future releases.

For a code sample that explicitly refetches data using the refreshRow() method, see "Refetching Rows in a Result Set--ResultSet6.java".


Note:

Scroll-sensitive result set functionality is implemented through implicit calls to refreshRow(). See "Oracle Implementation of Scroll-Sensitive Result Sets" for details.  





Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index