FIX: Error in Requery When Set Null Date Parameter to Not Null (166756)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q166756 SYMPTOMS
When you set a previously Null date parameter to no longer be Null, using
either CRecordset::SetParamNull() or CRecordset::SetFieldNull(), it may
cause a subsequent call to CRecordset::Requery() to generate the following
exception:
Invalid string or buffer length
CAUSE
During a call to CRecordset::Open, no memory is allocated for a Null date
field. However, CRecordset::Requery expects the memory to exist.
RESOLUTION
Create a replacement for the RFX_Date function which always allocates
memory for the date field. See the MORE INFORMATION section.
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++ .NET.
Modification Type: | Major | Last Reviewed: | 12/2/2003 |
---|
Keywords: | kbBug kbfix KB166756 kbAudDeveloper |
---|
|