Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes Retrieve byte Array stored in Oracle BLOB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Retrieve byte Array stored in Oracle BLOB" Watch "Retrieve byte Array stored in Oracle BLOB" New topic

Retrieve byte Array stored in Oracle BLOB

Kem Broder

Joined: Jul 25, 2002
Posts: 6
I've migrated from mySQL to Oracle and am having a problem reading a byte array that I have stored as a BLOB in Oracle. With mySQL the byte array was returned as I wanted, but with Oracle something strange is happening.
I'm using iBATIS to access the database. From some googling I've done I think that the byte array I am getting from Oracle is a representation of the BLOB rather than the data that I have stored in it. Any ideas how I can get my byte array back?
Any help greatly appreciated,
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
Have you seen Oracle's BLOB & CLOB example? It's here:

It's the "LOB Datatype" example. The "source" and "readme" are incomplete but uselful, the other link downloads the source for a complete working Swing application.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Retrieve byte Array stored in Oracle BLOB