Article ID: 250640 - Last Review: May 8, 2003 - Revision: 2.1 PRB: GetChunk Ignores Offset if Memo Field Is Included in GROUP BYThis article was previously published under Q250640 On This PageSYMPTOMS
The Offset argument of the GetChunk method is used to set the number of bytes to skip before copying begins within a Memo or Long Binary Field. However, when the Memo field is included in the GROUP BY clause of the recordset's SELECT statement, the Offset argument is being ignored. This causes the characters from the beginning of the field to be retrieved instead of the characters beginning at the Offset position. For example, if the Memo field contains 500 characters and the Offset and Numbytes arguments are set to 250, GetChunk returns the first 250 characters instead of the last 250 characters as would be expected. RESOLUTION
Rewrite the query to eliminate all Memo fields from the GROUP BY clause. This can be done by using an aggregate function on the Memo fields, such as the FIRST function. This allows the Memo fields to be removed from the GROUP BY clause. This workaround is illustrated in the example code below.
MORE INFORMATION
Microsoft Jet 4.0 has new functionality that allows you to use MEMO fields (Long Varchar) in the GROUP BY clause of a SQL statement. This is not available in earlier versions of the Jet database engine. NOTE: The workaround SQL statement works with older versions of Jet. Steps to Reproduce Behavior
REFERENCESFor additional information on how to use GetChunk, click the article number below
to view the article in the Microsoft Knowledge Base:
210486
(http://support.microsoft.com/kb/210486/EN-US/
)
ACC2000: Reading, Storing, and Writing Binary Large Objects
| Article Translations
|

Back to the top
