Hi Maruthi,
This should do what your after. The variable file is obviously the
file you want to insert into the database.
PreparedStatement prestate = websiteDBCon.prepareStatement("" +
"INSERT INTO Collateral (AccountTypeID," +
"Document" +
"VALUES (?)");
//make sure the statement is clear
prestate.clearParameters();
//add the file to the statement
prestate.setBinaryStream(1, //parameter reference
new FileInputStream(file), //file to insert
(int) file.length()); //length of file
//excute the statement
prestate.execute();
Hope this helps!
-Mike Fowler
"I could be a genius if I just put my mind to it, and I,
I could do anything, if only I could get 'round to it"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]