Given the records from the Employee table: and given the code fragment: try {
Connection conn = DriverManager.getConnection (URL, userName, passWord);
Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
st.execute("SELECT*FROM Employee");
ResultSet rs = st.getResultSet();
while (rs.next()) {
if (rs.getInt(1) ==112) {
rs.updateString(2, "Jack");
}
}
rs.absolute(2);
System.out.println(rs.getInt(1) + " " + rs.getString(2));
} catch (SQLException ex) {
System.out.println("Exception is raised");
}
Assume that:
The required database driver is configured in the classpath.
The appropriate database accessible with the URL, userName, and passWord exists.
What is the result?
JME_CHG
Highly Voted 4 years, 2 months ago6c84cb9
Most Recent 9 months, 1 week agoasdfjhfgjuaDCV
1 year, 3 months agosteefaand
1 year, 4 months ago9641
3 years, 6 months agolaura_lu93
4 years, 4 months agosansay61
4 years, 6 months agopul26
4 years, 6 months ago