dbTalk Databases Forums  

not recognize name of task

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


Discuss not recognize name of task in the microsoft.public.sqlserver.dts forum.



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

Default not recognize name of task - 12-11-2003 , 08:21 AM






In my "Data Task" Under Workflow properties, under options I have the name "DTSStep_DTSDataPumpTask_1"

Off of the connection that it transfers the data to I have "on success" workflow to an active x.

In the active x I have the below function:

Function Main()
Dim sMsg
Dim oTask
Dim oDataPump
Set oTask = DTSGlobalVariables.Parent.Tasks("DTSStep_DTSDataPu mpTask_1")
Set oDataPump = oTask.CustomTask
DTSGlobalVariable("GoodRows").Value = oDataPump.RowsComplete - oDataPump.RowsInError
DTSGlobalVariable("BadRows").Value = oDataPump.RowsComplete - oDataPump.RowsInError
DTSGlobalVariable("TotalRows").Value = oDataPump.RowsComplete
Set oDataPump = Nothing
Set oTask = Nothing
Set fso = CreateObject("Scripting.FileSystemObject")
end function

when I run it I get "Task 'DTSStep_DTSDataPumpTask_1' was not found.

Do I need to reference by a different name, I tried the description. Or am I suppose to reference something different?

Thanks for the help

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: not recognize name of task - 12-11-2003 , 09:47 AM






You are supplying the name of a step to an item in the Tasks collection

DTSGlobalVariables.Parent.Tasks("DTSStep_DTSDataPu mpTask_1")

Should be

DTSGlobalVariables.Parent.Tasks("DTSTask_DTSDataPu mpTask_1")

Also this Q is derived from one of your other posts which Darren is in the
process of helping you with "Keep track num of records failed in global
variable".



--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"kdabda" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
In my "Data Task" Under Workflow properties, under options I have the name
"DTSStep_DTSDataPumpTask_1"

Off of the connection that it transfers the data to I have "on success"
workflow to an active x.

In the active x I have the below function:

Function Main()
Dim sMsg
Dim oTask
Dim oDataPump
Set oTask = DTSGlobalVariables.Parent.Tasks("DTSStep_DTSDataPu mpTask_1")
Set oDataPump = oTask.CustomTask
DTSGlobalVariable("GoodRows").Value = oDataPump.RowsComplete -
oDataPump.RowsInError
DTSGlobalVariable("BadRows").Value = oDataPump.RowsComplete -
oDataPump.RowsInError
DTSGlobalVariable("TotalRows").Value = oDataPump.RowsComplete
Set oDataPump = Nothing
Set oTask = Nothing
Set fso = CreateObject("Scripting.FileSystemObject")
end function

when I run it I get "Task 'DTSStep_DTSDataPumpTask_1' was not found.

Do I need to reference by a different name, I tried the description. Or
am I suppose to reference something different?

Thanks for the help



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

Default Re: not recognize name of task - 12-11-2003 , 01:23 PM



In article <FFD089B2-FE81-4DFE-BC1C-7F2577886E2F (AT) microsoft (DOT) com>, kdabda
<anonymous (AT) discussions (DOT) microsoft.com> writes
Quote:
In my "Data Task" Under Workflow properties, under options I have the
name "DTSStep_DTSDataPumpTask_1"

Off of the connection that it transfers the data to I have "on success"
workflow to an active x.

In the active x I have the below function:

Function Main()
Dim sMsg
Dim oTask
Dim oDataPump
Set oTask = DTSGlobalVariables.Parent.Tasks("DTSStep_DTSDataPu mpTask_1")
Set oDataPump = oTask.CustomTask
DTSGlobalVariable("GoodRows").Value = oDataPump.RowsComplete -
oDataPump.RowsInError
DTSGlobalVariable("BadRows").Value = oDataPump.RowsComplete -
oDataPump.RowsInError
DTSGlobalVariable("TotalRows").Value = oDataPump.RowsComplete
Set oDataPump = Nothing
Set oTask = Nothing
Set fso = CreateObject("Scripting.FileSystemObject")
end function

when I run it I get "Task 'DTSStep_DTSDataPumpTask_1' was not found.

Do I need to reference by a different name, I tried the description. Or
am I suppose to reference something different?

Thanks for the help

Steps are used for workflow and "scheduling" type functions. The step
then relates to the task (TaskName property) which is the bit that does
the work.

Try "DTSTask_DTSDataPumpTask_1", notice the task Vs step in the name.
The names do not have to be in synch so to speak, but they normally are.

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