how can i save the text format to the database?

i'm using richtextbox,


Answer this question

how can i save the text format to the database?

  • iveys

    If you want to save the text including the formatting you can retrieve it from the RichTextBox.Rtf property.

  • Ronald Huereca

    It can be stored as text datatype. I am not sure about RTF if it is unicode, then you need to store it as ntext.



  • Brog

    Andreas Johansson wrote:

    It can be stored as text datatype. I am not sure about RTF if it is unicode, then you need to store it as ntext.

    i'm using a text datatype and it's working fine. how will i know if it's a unicode



  • Brent Hunt

    what should be the datatype for a rtf

  • snegidhan

    Unicode is a format to store characters that can not be represented by one byte and therefor has 2 bytes for each character.

    http://www.unicode.org/

    I have not really looked into RTF or how it works but I did a small test. I created a new document in wordpad and added some characters using the character map tool. I studied the saved RTF document and it is all stored as regular ASCII text. It encodes characters outside the regular set.



  • how can i save the text format to the database?