This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes reading BLOB type 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 "reading BLOB type" Watch "reading BLOB type" New topic
Author

reading BLOB type

nikil shar
Ranch Hand

Joined: May 25, 2008
Posts: 116
hi all,
am trying to read a BLOB from an oracle db using java1.5 (ojdbc5.jar) and both getBinaryStream() and getBytes() returns null. Have inserted a BLOB in that row which i am fetching so i dont know why i am getting null ??





any suggestions on what could be wrong ??



ta.

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

Have you tried getBlob()?


My Blog: Down Home Country Coding with Scott Selikoff
nikil shar
Ranch Hand

Joined: May 25, 2008
Posts: 116
yes have tried getBlob() but it still returns null. Have found that the BLOB in the db is actually null even though when i insert BLOB there are no errors thrown and it looks like the insert worked !!

ran this sql to find out the length of BLOB and they are all null :




heres how i insert the BLOB :




Please point out if you see anything wrong with the insert BLOB code.

ta.
 
 
subject: reading BLOB type