How to call OLE automation methods with VARIANT as parameters

How to call OLE automation methods with VARIANT as parameters

Post by Krish Seetharama » Sat, 12 Dec 1998 04:00:00


I have an automation object and one of its methods takes a
pointer to variant(in parameter) like
    HRESULT Delete([in] VARIANT *pvar);

I am unable to call this method from inside query analyzer.

it returns an error saying 'Bad Variable type'

Any ideas?



1. OLE Automation Stored Procedures and Variant


I use sp_OAMethod to execute a method to witch I pass a value. The value is
expected to be Variant.
I receive error:

HResult: 0x80004005,
Description: invalid variant type: 16392

Is there a way to pass value to Variant parameter in COM object
or should I consider this a bug?

Any help will be appreciated.


2. AutoNumber in SQLServer 2000

3. OLE Automation, "Invalid Variant Conversion"

4. Access Violation

5. SQL and OLE Automation - add to Collection method

6. Network Connect/Disconnect in WfW

7. OLE Automation - ExecuteWithResultsAndMessages method

8. Query Optimization

9. OpenOffice OLE Automation Type Parameter Problem

10. Receiving Parameter in OLE Automation

11. ole automation...calling objects in sql

12. OLE Automation object calling MTS Object

13. Help: Calling stored procedure from Impromptu using OLE Automation