DOCUMENT:Q259035 04-MAY-2001 [visualc] TITLE :PRB: GetChunk/AppendChunk Methods Are Not Clearly Explained PRODUCT :Microsoft C Compiler PROD/VER:winnt:3.51,3.6 OPER/SYS: KEYWORDS:kbdocfix kbGrpDSVBDB kbDSupport kbDAO360bug ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - The DAO SDK, versions 3.51, 3.6 ------------------------------------------------------------------------------- SYMPTOMS ======== In the Microsoft Data Access Object (DAO) 3.51 document, the GetChunk/AppendChunk methods that belong to the Field object are not clearly explained. For both methods, the variant that holds the data that is being transferred is said to be of subtype string. This is not true when the database field is of type dbLongBinary (BLOB). In this case the correct variant subtype is an array of bytes. RESOLUTION ========== Put binary data in arrays of bytes. Never assign arrays of bytes onto strings unless they have text semantic; that is, each byte represents an ASCII value that can be converted to a Unicode character. MORE INFORMATION ================ If you choose a variant of subtype string or a string to store binary data, that choice can lead to the following two problems if a byte-to-Unicode conversion occurs: 1. The physical size of the field is twice as big as the original binary data. 2. The conversion is dependent on the current code page for the process (that is usually inherited from the system settings). An application may be unable to read its data if a different code page is currently selected because the data was written. Also, changes to a given code page to add new symbols can lead to the same problem. Additional query words: vbwin SP4 Win98 98 ====================================================================== Keywords : kbdocfix kbGrpDSVBDB kbDSupport kbDAO360bug Technology : kbAudDeveloper kbDAOsearch kbSDKDAOSearch kbSDKSearch kbSDKDAO360 kbSDKDAO351 Version : winnt:3.51,3.6 Issue type : kbprb Solution Type : kbfix ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2001.