Groups | Blog | Home
all groups > sql server (microsoft) > august 2005 >

sql server (microsoft) : Issue with comparing line breaks


lasmit
8/31/2005 9:20:32 AM
I am updating a C# web project which stores the contents of an ASP web
form in an SQL Server 2000 database.

Originally the code deleted all the current contents of the database
and then re-inserted them. However, the requirements have changed and
it is now necessary to timestamp changes to individual rows.

My code loops through each element on the form and compares the text in
the text area to the text in the database. This works fine until I
come across a field with a line break in. The line break exists in the
database and is output into the form. However, when I compare the
contents of the text box to the database it does not find a match.

I have tried replacing /r/n with char(13) + char(10), and also just
with char(10) however still no results are returned.

I am really stumped by this and would really appreciate any help or
wisdom anyone has.

Thanks in advance

Lewis
AddThis Social Bookmark Button