How to insert CLOB using PreparedStatement
I am workding on a project using Oracle 8 database.
We need to store large amount of characters and we are palnning
to use CLOB to accomplish this.
If 'bio' is a CLOB field, how to I insert it?
String inssql =
"insert into emp (empid, name, dept, bio) "+
" values (?, ?, ?, ?)";
PreparedStatement pstmt = conn.prepareStatement(inssql);
pstmt.setInt(1, 123456);
pstmt.setString(2, "Bougnon Kipre");
pstmt.setString(3, "Rare Species Depatement" );
pstmt.setCLOB(4, XXXXX) ????? how do I do this?