by
This page contains the technical errata -- those things that are wrong or lead you astray -- in the first printing of the book. You may also want to view the minor errata list, especially before you email us about an error.
If you find an error in the book, please check to see if it is already known before reporting it. If you do not find it in the list, please mail us the relevant information, including page numbers. All errata will be fixed in the next possible printing.
while (rs.next()) {
int x = getInt("a");
String s = getString("b");
float f = getFloat("c");
}
should be replaced with the following lines of code:
while (rs.next()) {
int x = rs.getInt("a");
String s = rs.getString("b");
float f = rs.getFloat("c");
}
int jdbcType = rs.getColumnType(2);should be replaced with the following two lines of code:
ResultSetMetaData rsmd = rs.getMetaData(); int jdbcType = rsmd.getColumnType(2);
getInt
erroneously use getShort. The examples should be:
int x = rs.getInt(1);
or
int x = rs.getInt("EmployeeID");