Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 271553 - Last Review: May 8, 2003 - Revision: 2.1
PRB: Marshalling ADO Recordsets During an AddNew Method
This article was previously published under Q271553
When an ActiveX Data Objects (ADO) recordset is marshalled out-of-process while an
AddNew method is pending on the recordset, the result is that strings are set to zero length strings and numeric fields are set to zero.
This behavior is by design. Therefore, to avoid possible errors within your applications, Microsoft recommends that you either first save the current record or explicitly set all the values as appropriate before the recordset is marshalled.
When marshalling a recordset across apartment boundaries from one component to another while an
AddNew is pending on the recordset, it is strongly suggested that the component explicitly set the column values as expected prior to marshalling the recordset. If a recordset is marshalled during an
AddNew without the respective Update operation being invoked, all character fields are set to zero length strings and numeric columns are set to zero. Any component that receives the marshalled recordset must account for this behavior. This behavior is by design when marshalling any object and is not specific to ADO. It is the developer's responsibility to explicitly set column values to an appropriate value or NULL prior to marshalling the recordset.
APPLIES TO
- Microsoft Data Access Components 1.5
- Microsoft Data Access Components 10
- Microsoft Data Access Components 2.0
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.1 Service Pack 2
- Microsoft Data Access Components 2.1 Service Pack 1
- Microsoft Data Access Components 2.1 Service Pack 2
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.5 Service Pack 1
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate