This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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 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.
I agree. Here's the link:
subject: Preserving text format for adding to CLOB
It's not a secret anymore!