Inserting into CLOB field with prepared statement
843841May 4 2005 — edited May 4 2005I am trying to insert text into an Oracle CLOB field from a JSP page by setting up a prepared statement and then calling the following code:
String str = "some long text";
BufferedReader in = new BufferedReader(new StringReader(str));
ps.setCharacterStream(1,in,str.length());
ps.executeUpdate();
After running this nothing is inserted into the database.
I have successfully use ps.setAsciiStream(InputStream) with my prepared statement to insert some text, but this will not work for my application because it limits the types of characters that can be inserted.
I would appreciate any suggestions.
Thanks,
Noah