Notes on Reference Citations - Version 2.70, by Dr. Herong Yang
Insert and reterive the image into BLOB type
'Inserting BLOB Values with setBinaryStream() Method' tutorial was cited in a Sun forum post in 2009.
The Inserting BLOB Values with setBinaryStream() Method tutorial was cited in a Sun forum post in 2009.
Subject: Insert and reterive the image into BLOB type Date: Mar 3, 2009 Author: bandarurm Source: http://forums.sun.com/thread.jspa?threadID=5370946 >I am inserting an image in a table in Oracle 10G. Colomn's data type >is BLOB. Image size is 1KB. > >Before inserting the data into DB, length function gives the size >996. > >When I reterive the data from DB, length function gives the size 86. >I am not able to generate the image again from that data. > >Below is my code to insert and reterive the data. ... Below URLs should help you insert and retrieve images using binary streams. I have tried similar approach in my projects and it works. http://www.herongyang.com/jdbc/Oracle-BLOB-setBinaryStream.html http://www.herongyang.com/jdbc/Oracle-BLOB-getBinaryStream.html
Table of Contents