BUG: sp_OAGetProperty Fails on Properties From Inherited InterfaceID: Q236440
|
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.
A supported fix that corrects this problem is now available from Microsoft, but
it has not been fully regression tested and should be applied only to systems
experiencing this specific problem. If you are not severely affected by this
specific problem, Microsoft recommends that you wait for the next SQL Server service pack
that contains this fix.
To resolve this problem immediately, contact Microsoft Product Support Services
to obtain the fix. For a complete list of Microsoft Product Support Services
phone numbers and information on support costs, please go to the following
address on the World Wide Web:
http://www.microsoft.com/support/supportnet/overview/overview.aspThe English version of this fix should have the following file attributes or later:
Version File name Platform
------------------------------------
SQL 6.5 sql451i.exe x86
SQL 6.5 sql45ia.exe Alpha
SQL 7.0 s70709i.exe x86
SQL 7.0 s70709a.exe Alpha
NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.Q154871 Determining If You Are Eligible for No-Charge Technical Support
Microsoft has confirmed this to be a problem in SQL Server version 6.5 and 7.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:
exec @hr = master.dbo.sp_OACreate 'ADODB.Command', @ADO_Command OUT
if @hr <> 0
begin
print "failed in command creation"
goto fatal_exit
end
...
exec @hr = master.dbo.sp_OAGetProperty @ADO_Command, 'Parameters', @ADO_parms OUT
if @hr <> 0
begin
print 'Failed in GetProperty'
goto fatal_exit
end
fatal_exit:
...
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++.
Additional query words: sp_OAMethod
Keywords : SSrvProg SSrvTran_SQL kbbug6.50 kbbug7.00 kbSQLServ650bug kbSQLServ700bug
Version : winnt:6.5,7.0
Platform : winnt
Issue type : kbbug
Last Reviewed: July 16, 1999