COM error in vb.net2

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
 
M

Master Programmer

Trying to use COM from .NET is your punishment for using Visual Basic.

The Grand Master
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top