Subject | Re: [Firebird-Java] Re: problem: PreparedStatement with "? IS NULL" |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-09-23T11:27:35Z |
> with one parameter assignment makes more sense thanI would say that is more or less correct condition for JDBC (named
>
> WHERE column = ? OR (column IS NULL AND ? IS NULL)
parameters are not supported in prepared statements by the specification).
And I understand what you meant with that condition.
> I found out that i can workaround by using:Yes, that seems to be correct workaround.
>
> WHERE column = ? OR (column IS NULL AND ? = 0)
>
> and instead of using a setNull for the second parameter, i use a
> setInt that is 0 on a null value and 1 on something else.
Roman