Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: Marshalling ADO Recordsets During an AddNew Method


View products that this article applies to.

This article was previously published under Q271553

↑ Back to the top


Symptoms

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.

↑ Back to the top


Status

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.

↑ Back to the top


More information

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.

↑ Back to the top


Keywords: kbfaq, kbprb, KB271553

↑ Back to the top

Article Info
Article ID : 271553
Revision : 3
Created on : 5/8/2003
Published on : 5/8/2003
Exists online : False
Views : 337