The information in this article applies to:
SYMPTOMSCalling SetFieldNull() for a date or, in UNICODE builds, a text field causes an assert in DBCORE.CPP at line 4055 or line 4062:
CAUSEDuring Update(), both the RFX_Date() and RFX_Text() functions incorrectly add the date or unicode text field to the parameter map:
A subsequent call to SetFieldNull() will try to determine whether the field
is a parameter by checking the index returned by GetBoundParamIndex(). An
index >= 0 implies that the field is a parameter:
Because the RFX function incorrectly added the field to the parameter map,
an index >= 0 is returned by GetBoundParamIndex(). Because of this,
SetFieldNull() incorrectly calls the function to set or clear the Null
parameter status rather than the Null field status. If the index returned
by GetBoundParamIndex() is less the member variable CRecordset::m_nParams,
then the assert will occur:
RESOLUTIONCreate your own RFX_Date() or RFX_Text() function and comment out the line that adds the field to the parameter map. See the MORE INFORMATION section below for more for the steps to accomplish this. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ version 5.0. MORE INFORMATIONThe following steps detail one method of making the needed changes in RFX_Date or RFX_Text:
Additional query words: kbVC420bug kbDSupport crash gpf
Keywords : kbtshoot kbDatabase kbMFC kbODBC kbVC kbVC500fix |
Last Reviewed: January 31, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |