File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC - BLOB question -  any java guru with an answer? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JDBC
Reply Bookmark "JDBC - BLOB question -  any java guru with an answer?" Watch "JDBC - BLOB question -  any java guru with an answer?" New topic
Author

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

sanz nsgha
Ranch Hand

Joined: Jan 18, 2002
Posts: 42
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

Joined: Jul 09, 2001
Posts: 1879

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

Joined: Jan 18, 2002
Posts: 42
Thanks. DO you know any of such drivers?
 
 
subject: JDBC - BLOB question - any java guru with an answer?
 
Threads others viewed
JDBC - BLOB question for Java gurus
How to print a BLOB
Help......Writer BLOB from DB to File.....
BLOB Question - Any Java Guru out there?
Question on JDBC - BLOB
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture