Here are the info:
CLOB
.setClob()
method of the preparedstatement.So my question is how to create a Clob
object from this String so that I
can use setClob()
method.
Thanks in advance, Naveen
executeUpdate. Executes the SQL statement in this PreparedStatement object, which must be an SQL Data Manipulation Language (DML) statement, such as INSERT , UPDATE or DELETE ; or an SQL statement that returns nothing, such as a DDL statement.
Creating a PreparedStatement You can create an object of the PreparedStatement (interface) using the prepareStatement() method of the Connection interface. This method accepts a query (parameterized) and returns a PreparedStatement object.
If you want to write a String to CLOB column just use PreparedStatement.setString
.
If you want to know how to create a CLOB from String this is it
Clob clob = connection.createClob();
clob.setString(1, str);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With