Inserting rich text into an MS Access memo field.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I'm desperately trying to figure out how to take rich-formatted text from
a rich text box and store it in a memo field (or any other type of field!) in
an Access database.

Can anyone help?? Cheers :)
 
Hi Ben

The Memo field can be used as a text field. To put the rich-formatted text
into memo field, you have to get the rich text first. Use RichTextBox.Rtf
to get it. It is a string and then you can create a OleDbCommand with
parameter to do the insertion. The memo field is mapped to
OleDbType.LongVarWChar. You can use it as the Parameter type.

You can check the following link for more information about parameters.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemdataoledboledbparameterclasstopic.asp

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top