Monday, January 19, 2009

7.1.6 Sending JDBC NULL as an IN parameter

The setNull method allows a programmer to send a JDBC NULL (a generic SQL NULL) value to the database as an IN parameter. Note, however, that one must still specify the JDBC type of the parameter.
A JDBC NULL will also be sent to the database when a Java null value is passed to a setter method (if it takes Java objects as arguments). The method setObject, however, can take a null value only if the JDBC type is specified.

0 Comments: