none
ACCESS 'memo' filed length problem... RRS feed

  • Question

  • Hi...

    In my application i have one ACCESS 2007 database. In one of the table i have a column with the type as 'memo.

    As per the documentation the size of 'memo' field is 64000 but when i savinig data more than 255 its not getting saved completely.

    I am saving this data in the table programmatically using an INSERT query.

    What can be the problem...?

     

    Thanks in advance,

    IamHuM

    Thursday, April 8, 2010 6:08 PM

Answers

  • 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.
    Thanks Mike --------Please mark as answer if it is useful----------
    Monday, April 12, 2010 4:02 AM

All replies

  • 255 is the max limit of Text field. What is the data type which is mentioned in the 'Parameter' object?. I think you are using OleDBDataType? ( http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbtype.aspx)

    try to run the query standalone and verify the result. Possibly its getting trimmed from DB(Access).


    Thanks Mike --------Please mark as answer if it is useful----------
    Friday, April 9, 2010 6:14 AM
  • Data type is 'memo'.

    When i checked proeptes if that column in the design view genral tab. I saw one property 'Text Format'

    It has two options... TextBox & RichTextBox.

    What does this property signifies.?

     

    Thanks,

    IamHuM

    Saturday, April 10, 2010 8:25 AM
  • 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.
    Thanks Mike --------Please mark as answer if it is useful----------
    Monday, April 12, 2010 4:02 AM