wood burning stoves*
The moose likes JDBC and the fly likes how to write BLOB type of data from java application into an oracle table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to write BLOB type of data from java application into an oracle table" Watch "how to write BLOB type of data from java application into an oracle table" New topic
Author

how to write BLOB type of data from java application into an oracle table

Aparna Yadav
Greenhorn

Joined: Sep 13, 2004
Posts: 4
I want to write a java application which will store BLOB type of data into an oracle table & same way retrieve it from table.
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

use PreparedStatement !!! you can set your blob data using
PreparedStatement.setBlob(int i, Blob x)

and you can retrieve your blob from resultset using
resultset.getBlob(String colName)


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to write BLOB type of data from java application into an oracle table
 
Similar Threads
How to store & retrieve a video file from database?
Parsing BLOB datatype
BLOB data type
java.sql.SQLException: Unsupported feature
how to insert CLOB data type