Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

small problem while retrieving from database  RSS feed

 
gaurav chhabra
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • 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
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Report post to moderator
Whenever there is a line break, add the line.separator in the String and insert in the database.

 
gaurav chhabra
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Report post to moderator
thanks sir for ur response

actually i have one text box.........
i m retreiving its value ...
meassge = rs.getString("message");

and then inserting the value of meaasge in the database.....

that enter problem is arising then.....

plz give the solution for that....

thank you
gaurav
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Report post to moderator
If I understand your question, correctly. When you display your text information captured from a web page, it is not showing the <nl>, <cr> or <enter> that was entered? You must keep in mind that the HTML element "<br>" is similar to <Enter> or <CR>. HTML for the most part does not care about delimiters such as <cr>, <enter>, these are usually replaced with the <br> element.

I am not sure about the details. So, I could be mistaken.
 
Sarath Mohan
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Report post to moderator
While you insert into the database you have to insertthe enter keys (line seperator
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66186
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
guarav, please do not post the same question in multiple forums. Continue any discussion of this issue here.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!