truncation of memo field to 255 characters when creating a recordset

Posted on 2003-10-21
Last Modified: 2007-12-19
I am creating a recordset to be used in a website. The Website is emulating the functionality of a programmme already written in VB. One of the fields in the record set is of datatype memo, but when the record set is created all enties above 255 charaters are truncated to 255 characters, this was verified using the ActualSize function on the field. The DefinedSize of the field in the recordset is that of the memo datatype. This didn't happen in the original VB programme and it seems strange that the recordset picked up the max field size but only filled it to 255 characters.

It's quite important that I get this fixed quickly

Any ideas on how to get the whole entry into the recordset?
Question by:jbr26

Author Comment

ID: 9597925
I just fond out that the truncation doesn't work when I use the UNION command in the SQL statement. Is there anyway that I could use this command and for the field not to be truncated?

Expert Comment

ID: 9602989
Looks like you could be a victim of this: see MS KB article 259893

When you apply formatting, such as a closing or opening angle bracket (> or <), to a field with the Memo data type, the data in the field appears truncated after the 255th character.
When you apply formatting to a Memo field, the formatting is treated as a Text field, which has a 255-character limit. The data is not physically truncated, but only 255 characters are viewable.

You should probably see MS KB arrticle 194975:
This article describes how to read and write Binary Large Objects (BLOBs) using GetChunk and AppendChunk methods against fields in ADO. It also includes sample code using the NWIND sample database.
The GetChunk and AppendChunk methods work with the LongVarChar, LongVarWChar, and LongVarBinary column types, also known as TEXT, NTEXT, and IMAGE columns, in Microsoft SQL Server, and as MEMO and OLE fields in Microsoft Jet databases.
Good luck.

-- Eric

Author Comment

ID: 9605615
I found the solution as soon as I worked out it was to do with the UNION function, which truncates memo fields to 255 characters. I used UNION ALL instead and it all worked fine.

Thanks for the help

LVL 39

Expert Comment

ID: 9985376
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next seven days.

EE Cleanup Volunteer

Accepted Solution

SpazMODic earned 0 total points
ID: 10009844
PAQed, with points refunded (250)

EE Moderator

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now