Subject | getObject and blob |
---|---|
Author | Marczisovszky Daniel |
Post date | 2002-03-23T22:31:02Z |
Dear All,
I've been writing a persistence layer for JDBC. Actually I've
developed it with MySQL and PostgreSQL but now I have started to test
it with Firebird and with the new type 4 driver.
My problem is the following: According to this specification
http://java.sun.com/j2se/1.3/docs/guide/jdbc/spec/jdbc-spec.frame8.html
the JDBC driver should return a byte[] object when a BLOB is read from
a ResultSet using getObject(). But in FBBlobField.java at line 125 the
code returns a Blob object instead of the byte[] object.
IMHO this:
Object getObject() throws SQLException {
return getBlob();
}
should be replaced with this:
Object getObject() throws SQLException {
return getBytes();
}
I've changed it for myself, it works well, but I'm not familiar with
the source code (two days are not too much), so I don't know if it
causes any side effect...
Best wishes,
Daniel
I've been writing a persistence layer for JDBC. Actually I've
developed it with MySQL and PostgreSQL but now I have started to test
it with Firebird and with the new type 4 driver.
My problem is the following: According to this specification
http://java.sun.com/j2se/1.3/docs/guide/jdbc/spec/jdbc-spec.frame8.html
the JDBC driver should return a byte[] object when a BLOB is read from
a ResultSet using getObject(). But in FBBlobField.java at line 125 the
code returns a Blob object instead of the byte[] object.
IMHO this:
Object getObject() throws SQLException {
return getBlob();
}
should be replaced with this:
Object getObject() throws SQLException {
return getBytes();
}
I've changed it for myself, it works well, but I'm not familiar with
the source code (two days are not too much), so I don't know if it
causes any side effect...
Best wishes,
Daniel