Replace carriage return with < BR > in a MS SQL Database using ASP
Posted on 2007-04-03
I am running an ASP page to enter data into an MS SQL database into a text field (NVARCHAR) when the user enters a carriage return in the database it records it as two little squares. what I need to do is make a replace(FieldName, "TheSquare", "<Br>") so it will render the return as HTML however I can't seem to find what the "TheSquare" needs to be in order to replace it.
I have tried REPLACE(FieldName, vbCrLf, "< br> ")
I have tried REPLACE(REPLACE(FieldName, CHR(10), " < br > "), CHR(13), " < br > ")
*Note: I had to add spaces in the code example above becuse Experst Exchange Javescript failed when I tried to post the question
with no luck