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