FIX: ADO Recordset Loses Filter Property When Marshalled In-Proc

Article translations Article translations
Article ID: 264442
This article was previously published under Q264442
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

Symptoms

When you pass a disconnected ADO Recordset between two COM objects in the same COM+ application, certain extended properties of the Recordset such as the Filter property are lost. Under a similar configuration in a Microsoft Transaction Server (MTS) Package on Microsoft Windows NT 4.0, the extended properties are not lost.

Cause

COM+ now performs in-process marshalling when passing an ADO Recordset between two COM objects. When performing in-process marshalling, ADO creates the equivalent of a clone of the Recordset, rather than marshalling the existing ADO Recordset interface pointer. This causes a loss of extended properties such as the Filter property. The same loss of extended properties occurs when you create a clone of an ADO Recordset, or when you pass a disconnected ADO Recordset out-of-process, but these particular cases are by design.

Resolution

This problem is fixed in the latest service packs for Windows 2000 and MDAC 2.5.
  • To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
    260910 How to Obtain the Latest Windows 2000 Service Pack
  • To resolve this problem, obtain the latest service pack for Microsoft Data Access Components 2.5. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
    293312 INFO: How to Obtain the Latest MDAC 2.5 Service Pack
The English version of this fix should have the following file attributes or later:
   Date         Time    Version       Size      File name    Platform
   ------------------------------------------------------------------
   05/23/2000   22:22   2.51.5629.0   327,952   Msadce.dll   x86 
   05/23/2000   22:19   2.51.5629.0   487,696   Msado15.dll  x86 
				

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Data Access Components (MDAC) version 2.5 Service Pack 2, MDAC version 2.6, and Microsoft Windows 2000 Service Pack 2.

More information

In COM+, when an object such as an ADO Recordset is passed between two COM objects in the same COM+ application, the object is marshalled in-process rather than just passed as an interface pointer without marshalling. This occurs in COM+ even if the caller and callee COM objects are in the same process, thread, and COM apartment. When COM+ attempts to marshal an object between two COM objects, it queries for an IMarshal interface from the passed object. If the passed object returns an IMarshal interface, COM+ uses this interface to marshal the object in-process by calling IMarshal::MarshalInterface using the MSHCTX_INPROC flag.

Prior to applying this hotfix, a disconnected ADO Recordset implements in-process marshalling by creating the equivalent of a clone of the Recordset, which does not copy all of the Recordset extended properties such as Filter. So, if you pass an ADO Recordset between two COM objects in COM+, the extended properties such as Filter are lost.

After you apply the hotfix, ADO performs in-process marshalling using the Free Threaded Marshaler (FTM), which is equivalent to passing an interface pointer to the original object from caller to callee. Using the FTM, ADO can efficiently marshal an ADO Recordset inside COM+ and maintain all of the extended properties.

Note that if you pass a connected ADO Recordset that has its CursorLocation property set to adUseServer, this Recordset does not lose extended properties if passed between two COM objects in a COM+ application.

Properties

Article ID: 264442 - Last Review: October 26, 2013 - Revision: 3.0
Keywords: 
kbnosurvey kbarchive kbqfe kbhotfixserver kbado260fix kbbug kbfix kbmdac250sp2fix KB264442

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com