Insert in Database Column (Varchar) Formatted Data Through Insert Statement.

From: Sanjay Singh <singhsanju_at_yahoo.com>
Date: 17 Apr 2003 17:23:41 -0700
Message-ID: <66057525.0304171623.4e19c2f8_at_posting.google.com>


We have A Text box field where User can Enter Data. This data can be formatted. When I say formatted, I mean it shall contain Special Characters, Enter(Ascii 13), TAB and Paragraphed.

We are getting this information in Java String and Inserting it in database(Varchar column). During this process we loose formatting Here is example. Suppose someone Entered Text like this:



Text Starts

Deja is a great website to find all source of information & Text. Usually Deja has different sorts of users groups where people come and find solutions to their problems
However Deja was recently bought by yahooo.

          Here is summazrised reasons why I would go to Deja.
          1. Reason 1.
          2. Reason 1.   
          3. Reason 1.

Text Ends


When we insert Above data in Database and See the Result all formatting is lost and looks like this



Text Starts

Deja is a great website to find all source of information & Text. Usually Deja has different sorts of users groups where people come and find solutions to their problems However Deja was recently bought by yahooo. Here is summazrised reasons why I would go to Deja.1. Reason 1. 2. Reason 1 3. Reason 1.

Text Ends


Please let me know how to resolve this. Do I need to Read data in AsciiStream , But how do I insert data using SQL in Database.

I have to do some Java and Oracle Solutions. I shall appreciate any help in this regard.
Regards
Sanjay Received on Fri Apr 18 2003 - 02:23:41 CEST

Original text of this message