• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

exception in retrieveing Blob

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to retrieve a Blob from database in java.
Blob b =rs.getBlob("JOB");

But am getting this exception
java.lang.UnsupportedOperationException
at sun.jdbc.odbc.JdbcOdbcResultSet.getBlob(Unknown Source)

I am using the following driver
sun.jdbc.odbc.JdbcOdbcDriver

Kindly suggest the solution.

regards,
Lucky
 
Luqman Qaiser
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using jdk1.4 and Oracle9i
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason for the exception is exactly what the exception message says: the getBlob() method is unsupported. So you can't use it with the driver you are currently using.

If you are using Oracle, why not use one of the JDBC drivers which comes with that?
[ August 22, 2005: Message edited by: Paul Sturrock ]
 
Luqman Qaiser
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
I even tried oracle.jdbc.driver.OracleDriver,I have downloaded the latest jars like classes12.jar,ojdbc14.jar for this driver, still the exception persists.
Can you please be more specific as to which driver implements or supports the method getBlob().

Thanks and regards,
Lucky.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm. I'm currently using the getBlob() method with the thin driver supplied with v10i. Works fine.

If the exception remains:


sun.jdbc.odbc.JdbcOdbcResultSet.getBlob(Unknown Source)


then you are still using Sun's JDBC-ODBC Bridge driver.

[ August 22, 2005: Message edited by: Paul Sturrock ]
[ August 22, 2005: Message edited by: Paul Sturrock ]
 
Luqman Qaiser
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

I searched for v10i driver for oracle but no, 0 results
Is it a oracle driver? if yes please point me where i can download it and also the url to be specified in code.

Thanks and regards,
Lucky
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Get it where you got your other driver classes. Looking at the JavaDocs for the v8.1.7 thin driver though, the getBlob() method is not flagged as unsupported, so you shouldn't have to use a newer version of the driver. If you post the code you use to get your connection, perhaps we can see where you are going wrong.
 
Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic