COM error in vb.net2

  • Thread starter Thread starter paulhux174
  • Start date Start date
P

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
 
Trying to use COM from .NET is your punishment for using Visual Basic.

The Grand Master
 
Back
Top