Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieve byte Array stored in Oracle BLOB

 
Kem Broder
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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,
Cheers,
Kem
 
stu derby
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you seen Oracle's BLOB & CLOB example? It's here:
http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.html

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic