Error Assigning Task object to Custom Task object while calling DTS APIs in VB.NET

Error Assigning Task object to Custom Task object while calling DTS APIs in VB.NET

Post by Rajesh Thadhan » Tue, 06 Aug 2002 23:35:43



Hello,
I am using DTS in .NET on windows XP and am getting an error at the
statement "oCustomTask1 = oTask.CustomTask". The code snippet is as below :

    Dim oTask as DTS.Task
    Dim oCustomTask1 as DTS.BulkInsertTask

    oTask = goPackage.Tasks.New("DTSBulkInsertTask")
    oTask.Name = "DTSTask_DTSBulkInsertTask_1"

    oCustomTask1 = oTask.CustomTask           ---- THIS THROWS AN ERROR
"QueryInterface for interface DTS.CustomTask failed"

Could someone tell me how to solve the problem?

Thanks,
Rajesh

 
 
 

Error Assigning Task object to Custom Task object while calling DTS APIs in VB.NET

Post by Douglas Laudenschlager [MS » Wed, 07 Aug 2002 07:31:20


Rajesh,

Have you installed SQL Server Service Pack 2?
http://www.microsoft.com/sql/downloads/2000/sp2.asp

In my experience, Service Pack 2 has always resolved this error message on
the CustomTask interface. Please let me know your results.

-Doug

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.