How can I save the text of a rich text box in a sql express 2005 datatable ?
Of course I'd like to save the string and the format of the text (bold, color etc...).
Which column type I have to use for this RTF field ?
Thank you.
hi,
I'd guess nvarchar(MAX)
this data type can host up to 2gb of text data, in national format thus including chars other than the ones present in the traditional alphabet, like chinese, cyrillic and the like..
http://msdn2.microsoft.com/en-us/library/a1904w6t.aspx
http://msdn2.microsoft.com/en-us/library/ms186939.aspx
http://msdn2.microsoft.com/en-us/library/ms187752.aspx for the complete list of supprted data types..
regards
|||hi,
Thank you for your response.
In fact, my problem was I directly bind the text property and not the Rtf property of my rich text box to the sql field.
It's strange that the Rtf property is not available for binding in the designer so I have to code the binding !
Me.RichTextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Rtf", Me.TbTextBindingSource, "colText", True))
But now it's working !
regards
No comments:
Post a Comment