• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception when reading image( using getBLOB ) from database

 
Vijayendra Vishwanath
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody...

I'm trying to connect to a MS Access database which has a table to store Images using the Jdbc-Odbc bridge driver.

the following code is used to read a row from the table




i get this exception -

java.lang.ClassCastException: sun.jdbc.odbc.JdbcOdbcResultSet

at the line -





any solution for this problem??

thanks in advance
 
stu derby
Ranch Hand
Posts: 333
 
Vijayendra Vishwanath
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for posting the reply... but it didnt solve my problem..

i have to use MS Access Database.
cant i use Oracle "thin" or "oci" drivers to connect to MS Access DB??

thanks in advance
[ February 17, 2006: Message edited by: Vijayendra Vishwanath ]
 
Nicolas Stern
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vijayendra

I don't think it is possible to access a MS-Access DB with the Oracle driver.
[ February 17, 2006: Message edited by: Nicolas Stern ]
 
Vijayendra Vishwanath
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nicolas Stern:
Hi Vijayendra

I don't think it is possible to access a MS-Access DB with the Oracle driver.

[ February 17, 2006: Message edited by: Nicolas Stern ]


how do i sovle the classcastexception that i get when i use jdbc-odbc brigde to connect to Access DB??

thanks in advance
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The previous poster was phrasing things very politely. How about this

Oracle != Access

Just because you found a solution that worked with an Oracle database doesn't mean that you can force it to work with Access. Square peg, round holes and all that...

I'll admit it, in the past, before I discovered MySQL, I used Access
My advice is to use the java.sql.ResultSet method getBinaryStream. I've done it before and I know it works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic