Hi all,
I was so excited about changing quite a few fields from EDIT style to RICHTEXT style. But I noticed today that the RICHTEXT edit style doesn't retrieve or display data entered into the database prior to changing the dw edit style to RICHTEXT on that column. When testing the RICHTEXT edit style, I tested mostly on new records, or didn't notice that the original data wasn't there (Who would have thunk of that?). If I change the edit style back to EDIT, the original data shows.
Field lengths may be NVARCHAR(255) or NVARCHAR(max).
Also, I have a ue_keypress event on the dw control in the window, press F12 to insert time stamp. This works when the edit style is EDIT, but not when the edit style is RICHTEXT.
Do I need to abandon my efforts to change the edit styles?
~~~Tracy
I had 90% of this pieced together, but my solution put multi-line data onto a single line. So I updated my code as follows:
update notes
set notes = '{\rtf1\ansi\ansicpg1250\uc1\deff0{\fonttbl {\f0\fswiss\fcharset238\fprq2 Arial;}}\fs20 '
+ REPLACE(RTRIM(convert(nvarchar(max), notes)), CHAR(13) + CHAR(10), '\par ') + '}'
where notes not like '{\rtf1\%';
Works perfectly!
Many, many thanks for providing the missing link!
You might consider to use codepage 1252 for english. 1250 is for Central Europe.