The information in this article applies to:
SYMPTOMSWhen calling the CRecordset::GetFieldValue() method that accepts a CDBVariant object as a parameter and the target field in the database is a bit field, the BOOL value (m_boolVal) is incorrect. RESOLUTION
Use an explicit type other then SQL_C_BIT, such as SQL_C_UTINYINT or SQL_C_SLONG, as the type of variable to bind to. STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. MORE INFORMATIONThe following steps use the SQL Server Pubs database as an example: Steps to Reproduce Behavior
WorkaroundUse SQL_C_UTINYINT or SQL_C_SLONG explicitly in the CRecordset::GetFieldValue() method. Replace the last two lines of the previous code block with one of the following:
-or-
Additional query words: boolean odbc
Keywords : kbDatabase kbMFC kbODBC kbVC kbVC600 kbGrpVCDB |
Last Reviewed: May 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |