Replace enter with space

sql-server-2005, vb.net-2010

Solution

If you want to replace new-line chars in SQL-Server.

- Line Feed – CHAR(10)

- Carriage Return – CHAR(13)

So if you want to update a column and replace NewLines with white-spaces:

UPDATE TableName SET address=REPLACE(REPLACE(address, CHAR(13),' '), CHAR(10),' ');

Problem

How can i replace "Enter" in one of fields in the database with space actually I have tried the below codes in vb.net, but non of them is working for me ,, ``` address = Replace(address, System.Environment.NewLine, " ") ``` or ``` address = Replace(address, vbNewLine, " ") ``` or ``` address = Replace(address, Chr(13), "") ``` Language : Vb.net database : MSSQL 2005 Thanks in advance

Original source