ResultSet.updateInt(int columnIndex, int x) has the following syntax.
void updateInt(int columnIndex, int x) throws SQLException
In the following code shows how to use ResultSet.updateInt(int columnIndex, int x) method.
/*from ww w.java 2 s. c o m*/ import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class Main { public static void main(String args[]) throws Exception { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:Contacts"); Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt.executeQuery("select * from employee"); rs.moveToInsertRow(); rs.updateInt(1, 150); rs.updateString("First_Name", "Nigel"); rs.updateString("Last_Name", "Thornebury"); rs.insertRow(); } }