Monday, January 19, 2009

8.1.8 Retrieving NULL Values as OUT Parameters

The value returned to an OUT parameter may be JDBC NULL. When this happens, the JDBC NULL value will be converted so that the value returned by a getter method will be null, 0, or false, depending on the getter method type. As with ResultSet objects, the only way to know if a value of 0 or false was originally JDBC NULL is to test it with the method wasNull, which returns true if the last value read by a getter method was JDBC NULL, and false otherwise.

0 Comments: