开发者

How to save and Print new line character using SQL server 2008

开发者 https://www.devze.com 2023-02-14 04:08 出处:网络
I am trying to save data to the database with Multiline textbox. and another process is to read from th开发者_如何学Goe database and prints to a text file.

I am trying to save data to the database with Multiline textbox.

and another process is to read from th开发者_如何学Goe database and prints to a text file.

My problem is:

1) when I am trying to save the data in the database as new line character its taking unusally number of spaces between two words.

Please can any body help me out how to insert new line character in to the database.

thanks


Char(13) is a carriage return and Char(10) is a line feed.

so...

UPDATE tblEXAMPLE
SET Contents=@FIRSTLINE + chAr(13) + chAr(10)
  + @secondline + chAr(10) + chAr(13)
  + @lastline
WHERE KEY=@PRIMARYKEy
0

精彩评论

暂无评论...
验证码 换一张
取 消