PreparedStatement statement= getConnection().prepareStatement("INSERT INTO MYTABLE(MYBLODFIELD) VALUES(?)"); byte binData[] = myString.getBytes(); inStream = new ByteArrayInputStream(binData) statement.setBinaryStream(1, inStream, binData.length); statement.executeUpdate();
Wednesday, September 4, 2013
OracleDB: How to save a byte array to a BLOB field in Java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment