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 Problems with ResultSet.getBlob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problems with ResultSet.getBlob" Watch "Problems with ResultSet.getBlob" New topic
Author

Problems with ResultSet.getBlob

Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 302
I am inserting files in databases and reading them back. I am having problems reading the blobs. In MySQL getBlob() fails with an exception and my solution was to use getObject() and cast to byte[]; that works perfect. But now, I am trying to do the same with Microsoft Access; getBlob() fails as before and (byte[])getObject() still works but the contents is different from what I stored. I can use whatever way there is to store the contents of files in an Access database (I know it is not a real database but when you have to use it you have to use it).
Your help will be greatly appreciated,

Alejandro Barrero


Your help will be greatly appreciated,
Alejandro Barrero
RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
Does MSAccess suppourts Blob Data Type??


If you want something you never had do something which you had never done
Jhakda Velu
Ranch Hand

Joined: Feb 26, 2008
Posts: 166
Hi
Try using the GetChunk and AppendChunk methods. Check this site.
MSDN Support Site

Hope it helps.

Jhakda


If I become filthy rich, I'll sponsor research for painless dental treatment at Harvard Medical School. Thats why,I'm learning Java.I have 32 teeth, 22 are man made.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems with ResultSet.getBlob
 
Similar Threads
Help-How to retrive binary object
Data lost when writing object to a file
StreamCurruptedException
ClassCastException when casting my resultset to OracleResultSet
problem in storing an object to the database!