Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Query truncates memo field (97)

    I have a database that I use to store questions and generate online quizzes for the classes I teach. Here is part of the SQL query I use to pull out the data and put it roughly into format for importing into WebCT, an online testing tool:

    IIf(IsNull(problems.Explain),Null,":FEEDBACK: " & [Explain]) AS Feedback

    The ":FEEDBACK: " adds code that WebCT needs. [Explain] is a memo field that gives details on why the given answer is correct. The student does not see this until after taking the exam.

    Most of the time, this works well. However, sometimes the explanation is truncated in the middle. Based on some experimentation, I believe that this only happens when there is a long explanation so I am assuming that a statement like this has a character limit.

    If I put the [Explain] on a separate line, I get the entire explanation but then have to edit the export file to put the code back on the first line of the explanation as required by WebCT.

    Does anyone know of a work around?

    Ronny
    Ronny Richardson

  2. #2
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Query truncates memo field (97)

    Ronny,

    You are right, there is a character limit of 255 characters when querying against a memo field. One work around would be to use multiple fields in your query to get the first 255 characters, then the next 255, and so on. Then in your final result, concatenate the fields to re-generate the entire memo field.

    Searching the lounge for memo fields will also show other reviews on this item.

    HTH
    Regards,

    Gary
    (It's been a while!)

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query truncates memo field (97)

    The only workaround I know of is switching to a newer version of Access. There are fewer limitations for working with memo fields in Access 2000 and later. The expression you use won't truncate memo fields in Access 2002.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •