This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC - BLOB question - any java guru with an answer?

 
sanz nsgha
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. I have created a table tblRead in Access 2000 with only 1 field:
Field name: Notes
Field type: OLE Object (BLOB equivalent in Access)
2. I have a Java app - something like this:
ResultSet rs = stmt.executeQuery("select Notes from tblRead");
Blob data = rs.getBlob("Notes");
java.io.InputStream in = data.getBinaryStream();
int i;
while ((in.read()) > -1) {
i = in.read();
System.out.println(i);
}
Compiles fine. But gives exception: java.lang.UnsupportedOperationException.
Anybody, any idea where it went wrong?
Thanks
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your driver does not support BLOB operations on your database. You'll have to update/change your ( presumeably ODBC ) MSAccess ODBC drivers to support this feature, although I don't know if even the latest jdbc dbc bridge/MS Access driver combo support BLOBs, so you may have to buy one that supports this.
Jamie
 
sanz nsgha
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. DO you know any of such drivers?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic