File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question on JDBC - BLOB Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Question on JDBC - BLOB" Watch "Question on JDBC - BLOB" New topic
Author

Question on JDBC - BLOB

sanz nsgha
Ranch Hand

Joined: Jan 18, 2002
Posts: 42
Experiments on servlets ...
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?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 16617

Sanjay you cross posted this post in lots of places. It belongs in one forum JDBC, and there only. Please stop cross posting.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
 
subject: Question on JDBC - BLOB
 
Threads others viewed
JDBC - BLOB question for Java gurus
How to print a BLOB
BLOB Question - Any Java Guru out there?
JDBC - BLOB question - any java guru with an answer?
reading Blob without knowing the filename
MyEclipse, The Clear Choice

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