aspose file tools*
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
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Preserving text format for adding to CLOB" Watch "Preserving text format for adding to CLOB" New topic
Author

Preserving text format for adding to CLOB

A Sam
Greenhorn

Joined: Aug 21, 2001
Posts: 13
Hi,
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!
Thanks
-Sam
:roll:
A Sam
Greenhorn

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
Hi,
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.
 
wood burning stoves
 
subject: Preserving text format for adding to CLOB