u can do something like this ..hope u will get it ..
import these ...
import java.io.*;
import java.util.*;
import java.sql.*;
import oracle.sql.*;
import oracle.jdbc.driver.*;
then
insert an empty row in the table like this
stmt.executeUpdate("insert into blobdata (blob_nr,data) values ("+ +blobnr + " ,empty_blob())");
now u do just like this ..
ResultSet rs2;
BLOB blob=null ;
Stringcmd = "SELECT inhalt FROM blobdata WHERE blob_nr=" +blobnr + " for update";
rs2 = stmt.executeQuery(cmd);
if(rs2.next())
{
blob= ((OracleResultSet)rs2).getBLOB(1);
}
//filling blob
File binaryFile = new File("fileName);
FileInputStream instream = new FileInputStream(binaryFile);
OutputStream outstream = blob.getBinaryOutputStream();
int size = blob.getBufferSize();
byte[] buffer = new byte[size];
int length = -1;
while ((length = instream.read(buffer)) != -1)
outstream.write(buffer, 0, length);
instream.close();
outstream.close();
hope u can figure it out ..
if not then ask i will be happy to clarify it ..