Reference Citations - HerongYang.com - v2.92, by Dr. Herong Yang
insert a photo document in to the oracle database through JDBC
'Inserting BLOB Values with setBinaryStream() Method' tutorial was cited in a CodeRanch forum post in 2009.
The Inserting BLOB Values with setBinaryStream() Method tutorial was cited in a CodeRanch forum post in 2009.
Subject: unable to insert a photo document in to the oracle database through JDBC Date: September 23, 2009 Author: Tim McGuire Source: http://www.coderanch.com/t/463616/JDBC/java /unable-insert-photo-document-oracle >Is there a reason you all are avoiding "photoStream.available()"? >You're reading data from the stream so you should use a stream >parameter to determine how much to read. Using the photo.length() is >not valid to me since there's no guarantee photo.length() and >photoStream.available() are actually the same value. Either way, its >safer to use a stream parameter to read from the stream. photoStream.available() seems good to me. In fact, I'm going to use it from now on. All the examples I can find online though, use File.length() when doing an operation like this. http://www.java2s.com/Tutorial/Java /0340__Database...edStatementsetBinaryStream.htm https://www.herongyang.com/jdbc/MySQL-BLOB-setBinaryStream.html Google code search, on the other hand, shows plenty of both uses: http://www.google.com/codesearch?hl=en&lr=&q=setBi... Stream+lang%3Ajava&sbtn=Search http://www.google.com/codesearch?hl=en&lr=&q=setBi... ryStream+available&sbtn=Search
Table of Contents