Subject Re: [Firebird-Java] Re: OCTETS as binary (and another problem with CachedRowSetImpl)
Author Mark Rotteveel
On 19-7-2012 18:04, Fabiano wrote:
> Hi, Mark!
> No, it doesn't work using octetsAsBytes
> I´m using this URL:
> jdbc:firebirdsql://localhost/test?octetsAsBytes
> Last time i looked at the code, this parameter had no effect.
> I don´t remember exactly why, but the place it was implemented was never reached when column types was CHAR/VARCHAR.
> I presume this is still the case.
> If i remember correctly, the problem was happening here (FBField.pas, line 545). I´m almost sure field.sqlsubtype is never == 1 for CHAR/VARCHAR fields, what makes isOctetsAsBytes useless in this position. It makes a long time i traced this problem, sorry if i´m mistaken.

sqlsubtype should be 1 for OCTETS on (VAR)CHAR fields. I will check the
code and report back (probably this weekend).

> case Types.LONGVARCHAR :
> // check whether OCTETS should be returned as byte[]
> if (isOctetsAsBytes() && field.sqlsubtype == 1)
> return getBytes();
> else
> return getString();
> Is there a developer branch for 2.3? Is the change for OCTETS implemented? I need this feature badly, as all my PK columns are CHAR(16) OCTETS...

No there is no 2.3 development yet, we are first going to migrate the
repository from CVS to Subversion.

Mark Rotteveel