devxlogo

Make a ResultSet Scrollable

Make a ResultSet Scrollable

This code can also be used to navigate through the Resultset backward or forward, or to perform insertions, deletions and updates to update the database.

  //load JDBC Driver// Get the ConnectionStatementstmt=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);ResultSet resultset=stmt.executeQuery("SQL .." );resultset.absolute(3);//Moves the cursor to the  given row number.resultset.previous();//Moves the cursor to the previous row.
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist