Board index » delphi » Saving Rich Text to sql server Text Fields

Saving Rich Text to sql server Text Fields

How can I save Formatted Rich Text in a SQL Server Text Field without losing
the formatting?

Thanks in anticipation

 

Re:Saving Rich Text to sql server Text Fields


That depends entirely upon the front-end.  If you are using some kind of
rich text control, it should have a property you can read for the text
including all the formatting codes.

Quote
David Jones wrote in message <7pevb8$uu...@news4.svr.pol.co.uk>...
>How can I save Formatted Rich Text in a SQL Server Text Field without
losing
>the formatting?

>Thanks in anticipation

Re:Saving Rich Text to sql server Text Fields


That's right, if you're using the Visual Basic rich text control it has a
.Text property and a .TextRTF property.  The .TextRTF property will return
the text and all the associated codes which you can store in SS Text field.

Dianne Siebold

Quote
Steve Jorgensen wrote in message ...
>That depends entirely upon the front-end.  If you are using some kind of
>rich text control, it should have a property you can read for the text
>including all the formatting codes.

>David Jones wrote in message <7pevb8$uu...@news4.svr.pol.co.uk>...
>>How can I save Formatted Rich Text in a SQL Server Text Field without
>losing
>>the formatting?

>>Thanks in anticipation

Re:Saving Rich Text to sql server Text Fields


Quote
Dianne Siebold wrote in message ...
>That's right, if you're using the Visual Basic rich text control it has a
>.Text property and a .TextRTF property.  The .TextRTF property will return
>the text and all the associated codes which you can store in SS Text field.

>Dianne Siebold

Nothing like that in Delphi's TRichEdit though, eh? I couldn't find it?
Anybody knows?

Dan

Re:Saving Rich Text to sql server Text Fields


In TDBRichText, set PlainText property to False.

Good luck.
Gene

Quote
Daniel Stoian wrote in message ...
>Dianne Siebold wrote in message ...
>>That's right, if you're using the Visual Basic rich text control it has a
>>.Text property and a .TextRTF property.  The .TextRTF property will return
>>the text and all the associated codes which you can store in SS Text
field.

>>Dianne Siebold

>Nothing like that in Delphi's TRichEdit though, eh? I couldn't find it?
>Anybody knows?

>Dan

Re:Saving Rich Text to sql server Text Fields


Mmm, yeah, but the point was to save somehow the info related to the
formatting, not just the text...

Quote
Gene wrote in message <7phahu$1m...@nntp9.atl.mindspring.net>...
>In TDBRichText, set PlainText property to False.

>Good luck.
>Gene

>Daniel Stoian wrote in message ...
>>Dianne Siebold wrote in message ...
>>>That's right, if you're using the Visual Basic rich text control it has a
>>>.Text property and a .TextRTF property.  The .TextRTF property will
return
>>>the text and all the associated codes which you can store in SS Text
>field.

>>>Dianne Siebold

>>Nothing like that in Delphi's TRichEdit though, eh? I couldn't find it?
>>Anybody knows?

>>Dan

Re:Saving Rich Text to sql server Text Fields


Sorry--misinterpreted the question.  One needs to set PlainText property to
True to save formatting.

Good luck.
Gene

Quote
Daniel Stoian wrote in message ...
>Mmm, yeah, but the point was to save somehow the info related to the
>formatting, not just the text...

>Gene wrote in message <7phahu$1m...@nntp9.atl.mindspring.net>...
>>In TDBRichText, set PlainText property to False.

>>Good luck.
>>Gene

>>Daniel Stoian wrote in message ...
>>>Dianne Siebold wrote in message ...
>>>>That's right, if you're using the Visual Basic rich text control it has
a
>>>>.Text property and a .TextRTF property.  The .TextRTF property will
>return
>>>>the text and all the associated codes which you can store in SS Text
>>field.

>>>>Dianne Siebold

>>>Nothing like that in Delphi's TRichEdit though, eh? I couldn't find it?
>>>Anybody knows?

>>>Dan

Other Threads