Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Inserting into CLOB field with prepared statement

843841May 4 2005 — edited May 4 2005
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2005
Added on May 4 2005
1 comment
242 views