This content has been marked as final.
Show 1 reply
-
1. Re: Accessing BLOB from oracle.
raist_majere Mar 15, 2006 12:03 PM (in response to ram78)If you have the JDBC 3 driver for Oracle, then you can use J2SE 1.4 java.sql.Blob Following is the code I use in an app to insert a new blob into an existing record (before this insertion the blob i think was null in that record).
Statement st = null; ResultSet rs = null; try { conn.setAutoCommit(false); st=conn.createStatement(); st.executeUpdate("update estadistica set fitxer=empty_blob() where id_estadistica="+idEstadistica); st.close(); st=conn.createStatement(); rs=st.executeQuery("select fitxer from estadistica where id_estadistica="+idEstadistica); if (rs.next()) { rs.getBlob("FITXER").setBytes(1,bytes); } conn.commit(); } catch ...