Microsoft KB Archive/271553

= PRB: Marshalling ADO Recordsets During an AddNew Method =

Article ID: 271553

Article Last Modified on 5/8/2003

-

APPLIES TO


 * Microsoft Data Access Components 1.5
 * Microsoft Data Access Components 2.8
 * 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

-



This article was previously published under Q271553



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.



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.



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.

Additional query words: marshaling marshal

Keywords: kbprb kbfaq KB271553

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.