wood burning stoves 2.0*
The moose likes JDBC and the fly likes Preserving text format for adding to CLOB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Preserving text format for adding to CLOB" Watch "Preserving text format for adding to CLOB" New topic

Preserving text format for adding to CLOB

A Sam

Joined: Aug 21, 2001
Posts: 13
I am using textarea html to retrieve paragraphs with carriage return. I search for it using stringtokenizer and it exists.
I write to CLOB using java.io.Writer method.
But when i retrieve it back to display it in TEXTAREA in the html form, all the formatting is lost.
I tried using stringtokenizer while displaying also, but it cannot find the \r character.
Is this character lost while writing to CLOB.
Also, is there a way to define new line while adding text to CLOB.
Please help!
A Sam

Joined: Aug 21, 2001
Posts: 13
- The best work around that i could find was use java urlencoder to encode the characters to preserve the carriage returns.
It works!
Gus Mus
Ranch Hand

Joined: Feb 28, 2003
Posts: 53
I created an application to insert XML and read the XML back to/from Oracle DB using CLOB & Weblogic.
It's working fine except for some XML that I cannot read it back and got the SQL Exception with Oracle 24334 Error :
ORA-24334 no descriptor for this position
Cause: The application is trying to get a descriptor from a handle for an illegal position.
Action: Check the position number.
For loading / saving other XML it's working really perfect. I tried to analyze the XML but it's correct and no special characters inside.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Preserving text format for adding to CLOB
Similar Threads
Oracle CLOBs and JSP?
Displaying Extended Unicode charsets in Html TEXTAREA
how to cast String to Clob ?
Clob Cyrillic woes