dbTalk Databases Forums  

DTS - Using a custom built Task

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


Discuss DTS - Using a custom built Task in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter Newman
 
Posts: n/a

Default DTS - Using a custom built Task - 05-10-2004 , 06:06 AM






I have created a Custom Task using VB6

I've registered the task in the DTS as 'FileReader' and has two parameters 'ExistingFileName' and 'NewFileName

how do i set the two parameters for this task from an activex task ??

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

Default Re: DTS - Using a custom built Task - 06-11-2004 , 12:44 PM






In message <A1C93B98-B75C-4586-9D3A-2106701BC751 (AT) microsoft (DOT) com>, Peter
Newman <anonymous (AT) discussions (DOT) microsoft.com> writes
Quote:
I have created a Custom Task using VB6.

I've registered the task in the DTS as 'FileReader' and has two
parameters 'ExistingFileName' and 'NewFileName'

how do i set the two parameters for this task from an activex task ??

Make sure you set the script task to execute on the main package thread.
Right-click the task, workflow properties, options.

Dim oPkg
Set oPkg = DTSGlobbalVariables

Set oMyTask = oPkg.Tasks("DTS_TaskMyTask_Name").CustomTask

oMyTask.NewFileName = "NewFile.txt"

The above property access may not work in all cases, but this method
should-

oMyTask.Properties("NewFileName").Value = "NewFile.txt"



--
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.