java.io.file file = new java.io.file("/tmp/data"); int filelength = file.length(); java.io.inputstream fin = new java.io.fileinputstream(file); java.sql.preparedstatement pstmt = con.preparestatement( "update table5 set stuff = ? where index = 4"); pstmt.setbinarystream (1, fin, filelength); pstmt.executeupdate();