JDBC 2.0

JDBC ResultSet Update Record with Refresh Row

Refresh Row JDBC One of the new features of JDBC 2.0 is the introduction of updateXXX() methods in ResultSet interface. With these methods, without using SQL commands, a record in the table can be updated, inserted, deleted and now let us see updating a record with refreshRow() method. In the following code, a record’s old …

JDBC ResultSet Update Record with Refresh Row Read More »

JDBC ResultSet Enhancement Update Methods Example

ResultSet methods JDBC JDBC 2.0 ResultSet enhancement operations include the methods to update, insert or delete a record without writing the SQL commands. That is, SQL commands need not be known, of course for CRUD operations. This is the greatness of ResultSet methods JDBC. Example on ResultSet methods JDBC import java.sql.*; public class Updates { …

JDBC ResultSet Enhancement Update Methods Example Read More »

JDBC ResultSet Types and Concurrency

ResultSet Types Concurrency JDBC Overloaded createStatement() Method (knowledge required for ResultSet Types Concurrency JDBC). Before going into programming it is required to know more about createStatement() method of Connection interface. This method can have parameters. You know the following Statement object creation earlier. Statement stmt = con.createStatement(); The createStatement() method of Connection interface returns an …

JDBC ResultSet Types and Concurrency Read More »

Scrollable ResultSet

You retrieved records from database earlier in Select Records Example by iterating the records with the ResultSet object as follows. In the same example, you also have seen the ResultSet cursor movement in while loop. while(res.next()) { System.out.println(res.getInt(1) + “\t” + res.getString(2) + “\t” + res.getDouble(3)); } The above loop prints the records from top …

Scrollable ResultSet Read More »