The information in this article applies to:
SYMPTOMS
ActiveX Data Objects (ADO) does not correctly recognize properties of type
adIDispatch. If your ADO provider raises a custom property of type
adIDispatch, ADO does not correctly return the interface, for example:
When the current property represented by adoprop is of type adIdispatch, ADO invokes the Interface's default method rather than the IDispatch interface, and attempts to return the result from that. If the interface's default method requires arguments, then the call fails and an error is returned. This error is dependent on the implementation of the interface, but typically it appears to be "Type Mismatch" from OLE objects implemented using MFC OLE. RESOLUTION
There is no way to work around this bug within ADO. However, if you have
created your own OLE-DB provider, you can get around this by raising the
property, for example, as a column of a given recordset. In this case, you
would bind the IDispatch to a column using the OLE-DB
IAccessor::CreateAccessor interface, and then return that property via the
IRowset:GetData method.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this bug and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
MORE INFORMATIONSteps to Reproduce BehaviorGiven a custom OLE-DB provider that raises a property to the ADO Recordset object of type adIdispatch, this code may generate unexpected results for that property:
Additional query words:
Keywords : kbADO kbGrpMDAC |
Last Reviewed: November 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |