Article ID: 236440 - View products that this article applies to.
This article was previously published under Q236440
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 18763 (SQLBUG_65)
Using sp_OAGetProperty to retrieve a property value from an inherited COM interface fails. If the property value is requested as an OUTPUT parameter, the following error is returned:
When no OUTPUT parameter is supplied, such that sp_OAGetProperty would generate a result set, the command will return an empty result set.
Error: 2147745792 (0x80040000)
Source: ODSOLE Extended Procedure
Message: Error in parameters, or attempt to retrieve a return value from a method that doesn't supply one.
If an OUTPUT parameter is requested, sp_OAGetProperty must confirm that the interface supports the call and that it returns a value that is of the same datatype as the one supplied. However, it fails to correctly walk the object hierarchy to determine this information and will generate an error if this occurs.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561For more information, contact your primary support provider.
(http://support.microsoft.com/kb/254561/ )INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
Consider, for example, the Command object in Active Data Objects (ADO). In ADO 2.x, the Command object inherits from an interface named _Command15, which was the ADO 1.5 version of the interface. If sp_OAGetProperty is used to request a property in the base interface, such as Parameters, an error occurs. The following code snippet demonstrates the problem:
The definition of an object can be seen by using a tool such as the OLE - COM Object Viewer, available as part of Visual C++.
Contact us for more help
Connect with Answer Desk for expert help.