What I want to ask is what data type that I have to set for the message. Previously I am using nvarchar which I thought it would be ok, but when the time I save the message the ENTER command is become space in the database. For example I type
Message 1
Message 2
When I save into the database it become
Message 1 Message 2
I am new in using MS SQL server 7, so please give any suggestion about this.
Thanks,
REDit is not space, it is char(13) in the database.
you can replace it by whatever you want|||hi luber,
How do I replace it to make it saved in order. What data type do I have to set?
Thanks for the reply
RED|||it is ok for database.
If you want to put such a string on the asp.net page
and make new row each time when the user pressed enter
you can use something like this:
select replace(myfield, char(13), '<br>') as formatedfield
from mytable
No comments:
Post a Comment