Subject | Re: reading binary data (CHARACTER SET OCTETS) |
---|---|
Author | d_kozik |
Post date | 2006-08-29T17:37:02Z |
> The CHAR/VARCHAR columns according to the JDBC specification areResultSet.getObject(int) will
> by default mapped to String. That means that
> return you an instance of java.lang.String class. However, nobodyprevents
> you from using ResultSet.getBytes(int) method and you will get the rawKettle developers think that binary data should be returned as byte[].
> data.
They don't want to make any workarounds into their application to
enable Firebird to read binary data correctly when other databases
doesn't have this problem.
If you cannot change default behaviour of JDBC driver, can you change
it when some extra configuration option is set? Something like
'returnOctetsAsBytes' or whatever. When this option is set to true
then JDBC driver could return CHAR/VARCHAR OCTETS as array of bytes. I
hope it make sense.
Or at least, when I set parameter encoding=OCTETS, all CHAR/VARCHAR
should be returned as byte[]. As I tested, OCTETS is not allowed to be
set for parameter encoding now. Is there any reason for this?
Regards,
David