This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading BLOB type

 
nikil shar
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Saloon Keeper
Posts: 4020
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried getBlob()?
 
nikil shar
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic