Subject Re: [Firebird-Java] PreparedStatement, setInt() and NULL
Author Yves Glodt
On Tuesday 05 August 2008, Roman Rokytskyy wrote:
> > How can I insert a NULL-value into an Integer column?
> >
> > pstmt.setInt(1, Null) fails since setInt expects a primitive "int",
> > which can not be null, but only 0 or 1.
> >
> > How do others get their NULLs into the database?
>
> Use either setObject(...) or setNull(...) method.

Thanks, I went for setObject() !

> Roman