how to store a multiline textstring in a sql server db?
Posted on 2004-04-26
I have a text string, retrieved from a multiline textbox (c#.net). In the textbox I have used this input to test:
When I debug the program, I can see that the string variable containg the text looks like this when it is used in the Insert statement:
The \r\n represents linebreak.
But in the database only "This" is stored. "Is a Test" is not stored. It looks like sql server interprets the \r\n as an escape sequence or something??? The type in the database is nvarchar. Anybody have an idea how to store the whole string (with the linespaces, so that the linespaces are still there when I retrive the string from the db)????