dbTalk Databases Forums  

Using DTS Packages Saved as Visual Basic Files

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Using DTS Packages Saved as Visual Basic Files in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Eddie Suey
 
Posts: n/a

Default Using DTS Packages Saved as Visual Basic Files - 09-10-2003 , 04:08 PM






I'm trying to convert the VB code auto generated by SQLServer Import/Export
mod into valid VB.net code and am receiving error for the following line:

oTask = goPackage.Tasks.New("DTSDataPumpTask")

This returns a DTS.Task. Is there any other way to create this task?



Reply With Quote
  #2  
Old   
Prasad
 
Posts: n/a

Default Using DTS Packages Saved as Visual Basic Files - 09-10-2003 , 04:30 PM






Hi,
Modify the function parameters:
Use this piece of code
Public Sub Task_Sub1(ByVal goPackage As DTS.Package2)
instead of
Public Sub Task_Sub1(ByVal goPackage As Object)

Also modify the following lines of code too

Public Sub oCustomTask1_Trans_Sub1(ByVal oCustomTask1 As
Object)
this should read as
Public Sub oCustomTask1_Trans_Sub1(ByVal oCustomTask1 As
DTS.DataPumpTask2)

That should solve your problem.

Thanks
Prasad
Quote:
-----Original Message-----
I'm trying to convert the VB code auto generated by
SQLServer Import/Export
mod into valid VB.net code and am receiving error for the
following line:

oTask = goPackage.Tasks.New("DTSDataPumpTask")

This returns a DTS.Task. Is there any other way to
create this task?


.


Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: Using DTS Packages Saved as Visual Basic Files - 09-10-2003 , 05:14 PM



In article <OKwG0#9dDHA.2140 (AT) TK2MSFTNGP09 (DOT) phx.gbl>, Eddie Suey
<esuey (AT) inBizServices (DOT) com> writes
Quote:
I'm trying to convert the VB code auto generated by SQLServer Import/Export
mod into valid VB.net code and am receiving error for the following line:

oTask = goPackage.Tasks.New("DTSDataPumpTask")

This returns a DTS.Task. Is there any other way to create this task?


Converting a DTS Package from Visual Basic 6.0 to Visual Basic .Net
(http://www.sqldts.com/default.aspx?264)

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.