java类库详细讲解
源代码在线查看: createscrollableresultset.html
Creating a Scrollable Result Set
(Java Developers Almanac Example)
BODY CODE {font-family: Courier, Monospace; font-size: 11pt} TABLE, BODY {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt} PRE {font-family: Courier, Monospace; font-size: 10pt} H3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11pt} A.eglink {text-decoration: none} A:hover.eglink {text-decoration: underline} -->
The Java Developers Almanac 1.4
Order this book from Amazon.
Home
>
List of Packages
>
java.sql
[73 examples]
>
Scrollable Result Sets
[6 examples]
e267.
Creating a Scrollable Result Set
A scrollable result set allows the cursor to be moved to any row in
the result set. This capability is useful for GUI tools for browsing
result sets.
See also e266 Determining If a Database Supports Scrollable Result Sets.
try {
// Create an insensitive scrollable result set
Statement stmt = connection.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
// Create a sensitive scrollable result set
stmt = connection.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
} catch (SQLException e) {
}
Related Examples
e266.
Determining If a Database Supports Scrollable Result Sets
e268.
Determining If a Result Set Is Scrollable
e269.
Moving the Cursor in a Scrollable Result Set
e270.
Getting the Cursor Position in a Scrollable Result Set
e271.
Getting the Number of Rows in a Table Using a Scrollable Result Set
See also:
Batching
Connections
Database Meta Data
Deleting Data
Drivers
Importing and Exporting
Inserting and Updating Data
Oracle OBJECTs
Oracle VARRAYs
Procedures and Functions
Retrieving Data
Tables
Updatable Result Sets
© 2002 Addison-Wesley.