PRB: Calculated Field Contents Cannot be Modified by ADO (241818)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.01
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.1 SP1
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- Microsoft SQL Server 6.5 Service Pack 4 and later
- Microsoft SQL Server 7.0
This article was previously published under Q241818 SYMPTOMS Trying to modify the contents of a calculated field within
an ActiveX Data Objects (ADO) recordset, generates the following error:
Runtime error '-2147217887(80040e21)' errors occurred.
CAUSE Each calculated field in an ADO recordset contains the
following attributes: - adFldUnknownUpdatable = False
-and- - adFldUpdatable = False
This indicates that the field cannot be modified.
RESOLUTION Here are two ways to work around this behavior:
- Use the Shape command to append a field into the ADO recordset.
-or- - Use the calculated field for display purposes only without
modifying its contents.
STATUS This behavior is by design. REFERENCES For more information on how to use the Shape command to append a field to an ADO recordset, visit
the following article in the Microsoft Knowledge Base:
223771 PRB: Appending Fields to a
Recordset Generates an Error
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbCodeSnippet kbDatabase kbprb KB241818 |
---|
|