FIX: Only 64K of Data Transferred via CLongBinary

Last reviewed: September 19, 1997
Article ID: Q141352
1.50 WINDOWS kbprg kbbuglist kbfixlist

The information in this article applies to:

  • The Microsoft Foundation Classes (MFC), included with: Microsoft Visual C++ for Windows, version 1.5

SYMPTOMS

Only the first 64K of the CLongBinary data is transferred correctly to a record.

CAUSE

A bug in CRecordset::UpdateInsertDelete() causes only the first 64K of data to be transferred correctly to a record. This is caused by using a far pointer instead of a huge pointer.

RESOLUTION

Change line 2453 in the Dbcore.cpp file, and rebuild the MFC library.

Change it from:

   const BYTE FAR* lpData =
            (const BYTE FAR*)::GlobalLock(pLongBinary->m_hData);

to:

   const BYTE __huge * lpData =
            (const BYTE __huge *)::GlobalLock(pLongBinary->m_hData);

For more information on rebuilding the MFC library, refer to the Class Library User's Guide or to the Readme.txt file located in the Mfc\Src directory.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Visual C++ for Windows, version 1.51.


Additional reference words: 2.50
KBCategory: kbprg kbbuglist kbfixlist
KBSubcategory: MFCDatabase
Keywords : MfcDatabase kbbuglist kbfixlist kbprg
Technology : kbMfc
Version : 1.50
Platform : WINDOWS
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.

Last reviewed: September 19, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.