|
Jan
30
|
That can be achieved with a PreparedStatement and its setBytes() method.
String sql = "INSERT INTO my_table (byte_array) VALUES (?)"; PreparedStatement statement = connection.prepareStatement(sql); byte[] buffer = somwhere.getSomeByteArray(); statement.setBytes(1, buffer); statement.executeUpdate(); statement.close();



Recent Comments