|Subject||NPE with latest Interclient|
i' ve downloaded the newest Interclient 2.01 from 15.11. for Firebird.
It throws a NullPointerException if a null-value is inserted via
a setString(),SetDate(),setTimestamp()-method (and others that deals with objects and not primitives) from PreparedStatement.
I know that this is 'by design' of the driver and is unchangend from the original
borland interclient, but i think this is the wrong behaviour.
I think the driver should insert a NULL-Value in the database if the column in the db allows null-values. If null-values are not allowed it should raise a SQLException but never a NPE.
The javadoc from setString()(both original fom JDK and from the driver) says nothing about not inserting null-values nor says it something that a NPE can be thrown inside the method.
I know that i can check about null-values in my application and then use the setNull()-method, but this would be a much overloaded effort,
because setString(),setTimestamp(),setDate can be used hundreds of times in an
application so it would be much easier to check this in the driver (only 1 check), and call setNull() from there.
Every other driver i've used so far (Adabas D, SAP DB, IBM DB2) has no problems with null-values and this is just a little change in the PreparedStatement-src.
Now i must change the src for myself every time i download a new version of interclient.