Home All Groups Group Topic Archive Search About
Author
13 Dec 2006 6:38 AM
paulhux174
I'm running a dts task from a converted dts package in vb.net2.
I get an COM error.

        Dim oTask As DTS.Task
        'Dim oLookup As DTS.Lookup

        Dim oCustomTask1 As DTS.DataPumpTask2
        oTask = CType(goPackage,
DTS.Package).Tasks.New("DTSDataPumpTask")
        oCustomTask1 = CType(oTask.CustomTask, DTS.DataPumpTask)
        ' then ERRORS
{"Unable to cast COM object of type 'System.__ComObject' to interface
type 'DTS.CustomTask'. This operation failed because the QueryInterface
call on the COM component for the interface with IID
'{10020904-EB1C-11CF-AE6E-00AA004A34D5}' failed due to the following
error: No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE))."}    DTS.CustomTask

Any ideas please

Author
13 Dec 2006 7:34 AM
Master Programmer
Trying to use COM from .NET is your punishment for using Visual Basic.

The Grand Master


paulhux***@hotmail.com wrote:
Show quoteHide quote
> I'm running a dts task from a converted dts package in vb.net2.
> I get an COM error.
>
>         Dim oTask As DTS.Task
>         'Dim oLookup As DTS.Lookup
>
>         Dim oCustomTask1 As DTS.DataPumpTask2
>         oTask = CType(goPackage,
> DTS.Package).Tasks.New("DTSDataPumpTask")
>         oCustomTask1 = CType(oTask.CustomTask, DTS.DataPumpTask)
>         ' then ERRORS
> {"Unable to cast COM object of type 'System.__ComObject' to interface
> type 'DTS.CustomTask'. This operation failed because the QueryInterface
> call on the COM component for the interface with IID
> '{10020904-EB1C-11CF-AE6E-00AA004A34D5}' failed due to the following
> error: No such interface supported (Exception from HRESULT: 0x80004002
> (E_NOINTERFACE))."}    DTS.CustomTask
>
> Any ideas please