Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes JDBC and Relational Databases 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 Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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.
I agree. Here's the link:
subject: Retrieve byte Array stored in Oracle BLOB