If you store '0' and '1' in a varchar(1) or char(1) column, you can read
false and true respectively using ResultSet.getBoolean. This is great,
especially if you are migrating from an Oracle database (shamefully
Oracle doesn't have a Boolean data type).
However, if you try to use PreparedStatement.setBoolean to set a value
used in the "where" clause to compare to that '0'-or-'1' varchar(1) or
char(1) column, then your select returns nothing.
Isn't this behavior inconsistent between getBoolean and setBoolean? Is
this a bug?
(Oracle jdbc driver does allow getBoolean and setBoolean with char(1)
and varchar2(1) consistently).
Thanks,
Paulo Merson
Summa Technologies - www.summa-tech.com