Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception in retrieveing Blob

 
Luqman Qaiser
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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate 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
Eclipse IDE Hibernate 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
Eclipse IDE Hibernate 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic