Inserting rich text into an MS Access memo field.

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 :)
 
K

Kevin Yu [MSFT]

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."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top