Thread: Support for JDBC Binary type

Support for JDBC Binary type

From
Thorsten Mauch
Date:
Hi All
I use postgresql with castor. The current JDBC-Driver doesn't
support binary objects through getObject and setObject. Castor
uses this methods. In order to make the Driver compatible with
castor i changed the

PreparedStatwment.setObject in line 551 and add
ther following code:
              case Types.BINARY:
              case Types.VARBINARY:
                        setObject(parameterIndex,x);
                         break;

and ResultSet.getObject in line 829 i add
       case Types.BINARY:
       case Types.VARBINARY:
             return getBytes(columnIndex);

Maybe it is usefull for other than castor users. So i want
to propose to add this code to the JDBC-Driver.

Thanx Thorsten