FIX: IRowsetImpl::GetData() Does Not Handle Nulls Correctly (217185)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.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 Q217185 SYMPTOMS
When an OLE DB Provider returns a DBSTATUS of DBSTATUS_S_ISNULL for a text field created using the ATL OLE DB Provider templates then the length of the field returned to the OLE DB consumer is not explicitly set to zero. This behavior follows the OLE DB specification, but can cause problems if an OLE DB consumer application utilizes the field length without checking the DBSTATUS of the column first. For example, a consumer application may assume that a non-zero field length means that the field is not NULL which is a common assumption when using text fields.
CAUSE
IRowsetImpl::GetData does not explicitly set the length for the column to zero if the DBSTATUS of the column is set to DBSTATUS_S_ISNULL.
Modification Type: | Major | Last Reviewed: | 11/18/2003 |
---|
Keywords: | kbBug kbDatabase kbfix kbMDACNoSweep kbProvider kbVS600sp3fix KB217185 |
---|
|