Subject | Binary conversion to VARCHAR (is it expected)? |
---|---|
Author | Fabiano |
Post date | 2011-04-13T16:18:22Z |
Hi, all!
I´m using jaybird-2.1.6 with Firebird 2.1.4 and facing a problem with a binary column.
This column is intended to store binary data, and was created this way:
create table t (
column CHAR(16) CHARACTER SET OCTETS
COLLATE OCTETS);
Now i´m selecting from this column, and Jaybird is considering it is a VARCHAR.
The problem is that i use a CachedRowSet implementation to store the ResultSet in memory and close the connection, and the CachedRowSet implementation thinks it is a VARCHAR column when caching it, and it loses information and gives an exception when i call this column from the CachedRowSet.
Is this expected or can be considered a bug or a candidate for improvement?
Do someone can imagine a workaround in the SQL instruction to force this column to be treated as binary?
Regards,
Fabiano
I´m using jaybird-2.1.6 with Firebird 2.1.4 and facing a problem with a binary column.
This column is intended to store binary data, and was created this way:
create table t (
column CHAR(16) CHARACTER SET OCTETS
COLLATE OCTETS);
Now i´m selecting from this column, and Jaybird is considering it is a VARCHAR.
The problem is that i use a CachedRowSet implementation to store the ResultSet in memory and close the connection, and the CachedRowSet implementation thinks it is a VARCHAR column when caching it, and it loses information and gives an exception when i call this column from the CachedRowSet.
Is this expected or can be considered a bug or a candidate for improvement?
Do someone can imagine a workaround in the SQL instruction to force this column to be treated as binary?
Regards,
Fabiano