S
stc
I've been googling for hours now and what I've found out is that there's
just no way to use the same code for handling BLOBs in Oracle and other
databases. Am I wrong?
All examples I've come across suggest that one should cast
java.sql.ResultSet to oracle.jdbc.driver.OracleResultSet when retrieving
oracle.sql.BLOB objects and using streams (or put/get bytes) to read from or
write to BLOBs.
There are methods in java.sql.PreparedStatement and java.sql.ResultSet
(get/set blob, get/set bytes, get/set binary stream) but they're not working
for me.
I'm using Oracle 9i database and ojdbc14.jar that contains Oracle JDBC
driver for Java 1.4 and beyond. So technically I could use Oracle JDBC
classes and write database-specific code but I would like to write code that
would work OK if I ever switch to DB2 or PostgreSQL.
just no way to use the same code for handling BLOBs in Oracle and other
databases. Am I wrong?
All examples I've come across suggest that one should cast
java.sql.ResultSet to oracle.jdbc.driver.OracleResultSet when retrieving
oracle.sql.BLOB objects and using streams (or put/get bytes) to read from or
write to BLOBs.
There are methods in java.sql.PreparedStatement and java.sql.ResultSet
(get/set blob, get/set bytes, get/set binary stream) but they're not working
for me.
I'm using Oracle 9i database and ojdbc14.jar that contains Oracle JDBC
driver for Java 1.4 and beyond. So technically I could use Oracle JDBC
classes and write database-specific code but I would like to write code that
would work OK if I ever switch to DB2 or PostgreSQL.