• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

small problem while retrieving from database

 
gaurav chhabra
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello sir

i m making one forum amd when i post some topic and when then i retrieve then it is not reading the "<ENTER>".like.............
i have written.........

JAI SHRI RAM
JAI MATA DI

then while retrieving from database it is showing it as .........

JAI SHRI RAM JAI MATA DI

it is not reading the <ENTER>...

plz tell me that what to do.......

thank you
gaurav
 
Monarchy Javatheone
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gaurav Please USe '\n' to get a new line
In the above details i think you could have typed the content straightly so that the word may get wrapped in it like

Jai Bajrang Bali Jai Mata di

Jai Bajrang Bali <press Enter>
Jai Mata Di
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which dataase are you using ?

I dont find any such problem with oracle.
Are you sure are sending <Enter> (\n or \r) to database for insert ?

thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gaurav,
Where are you getting the data from? If it's a textarea, the formatting isn't preserved.

You can try printing out the string before you put it in the database. This will tell us if it is an input problem or a database problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic