wood burning stoves 2.0*
The moose likes JDBC and the fly likes Uplod Blob with stream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Uplod Blob with stream" Watch "Uplod Blob with stream" New topic
Author

Uplod Blob with stream

roberto zzzz
Greenhorn

Joined: Mar 19, 2009
Posts: 2
Hello,
I want to store big data in a blob (Oracle 10g)
I can use only Store Procedures...
My problem is :

I don't know the blob size and CallableStatement provide only a method setBinaryStream (column, inputStream, size).
The method setBinaryStream(column, inputStream) is not available .

waht is the value for "size" ?

the value "-1" don't work....

Tank you.

Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
e ae blz

I tested here and this method exist.


http://www.giraffeed.com/show-image.php?id=bf48b0b680801f0bfeac3ce24d7e9787

What version of JDK you are using?

roberto zzzz
Greenhorn

Joined: Mar 19, 2009
Posts: 2
ver 1.4.2 and this method do not exist

tank you...
Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
roberto zzzz wrote:ver 1.4.2 and this method do not exist

tank you...


I'm using JDK 6 and this method exist.

http://java.sun.com/javase/downloads/index.jsp
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
roberto zzzz wrote:
waht is the value for "size" ?

Do a guess? What does the parameter name "size" itself say when you keep a binary stream in mind?
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Have you read the Javadoc at any way? http://java.sun.com/javase/6/docs/api/java/sql/CallableStatement.html#setBinaryStream(java.lang.String,%20java.io.InputStream,%20int)
Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
congratulations Bauke Scholtz!
2000 messages!!!

don't reply my post

=D
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Heh, it isn't that much. Congratulate if I'm over 50K or so.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Uplod Blob with stream