File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes setBlob() method fro preparedstatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "setBlob() method fro preparedstatement" Watch "setBlob() method fro preparedstatement" New topic

setBlob() method fro preparedstatement

rakesh kadulkar
Ranch Hand

Joined: Jul 24, 2008
Posts: 115
I am trying to insert a video into oracle database using setBlob() mwthod of the PreparedStatement interface.
My code is compiling sucesfully but i am getting a runtime error.

My code is:

The error is:
oracle.jdbc.driver.OraclePreparedStatement .setBlob() at line 29

please help

Rakesh Kadulkar
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

check out the docs for preparedStatement:

Use setBinaryStream instead of setBlob as the changes below :

I agree. Here's the link:
subject: setBlob() method fro preparedstatement
It's not a secret anymore!