![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am writing logic where I use an ExecuteSQL task to define multiple source views, then want to use data pump tasks to pump from each of 12 source views to a target table. To do this, I have defined 1 datapump task and disabled it so it does not run as part of the automatic workflow. Then I have written an ActiveX script task to change the source objectName and execute the task 12 times in a loop. My problem is with the syntax of the task.execute method. Books online tells me the parameters are "object.Execute pPackage, pPackageEvents, pPackageLog, pTaskResult" but gives no example of declaring and ionitializing the needed references and calling the method. Searching google and the knowledge base has also failed to come up with the cookbook code I need. I have flailed trying to get it right, and still get a type mismatch error when I call the method. Can someone please provide a "hello world" example that uses dtstask.execute? Thanks much in advance. If you wish to reply to me directly, you may email v- normb (AT) foobar (DOT) com, where foobar = the name of the world's biggest software company (the makers of sql server, bless and curse them). Thanks again, nb |
#3
| |||
| |||
|
|
I think the simple answer is that the task execute method is internal only. There is also a step execute method, which makes more sense if you think about the relationship between the two, but again this is really only for internal use although it has been used in this context. The generally recognised way of doing this is slightly more work, and involves using workflow to re-execute the task through the normal run-time scheduler style process. Some examples- How to loop through a global variable Rowset (http://www.sqldts.com/default.aspx?298) How to export all tables in a database (http://www.sqldts.com/default.aspx?299) Looping, Importing and Archiving (http://www.sqldts.com/default.aspx?246) Simple Loop Example http://www.sqldts.com/redir.aspx?1295 -- Darren Green http://www.sqldts.com "Norm Bowler" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:474001c47355$ea6fb3e0$a301280a (AT) phx (DOT) gbl... I am writing logic where I use an ExecuteSQL task to define multiple source views, then want to use data pump tasks to pump from each of 12 source views to a target table. To do this, I have defined 1 datapump task and disabled it so it does not run as part of the automatic workflow. Then I have written an ActiveX script task to change the source objectName and execute the task 12 times in a loop. My problem is with the syntax of the task.execute method. Books online tells me the parameters are "object.Execute pPackage, pPackageEvents, pPackageLog, pTaskResult" but gives no example of declaring and ionitializing the needed references and calling the method. Searching google and the knowledge base has also failed to come up with the cookbook code I need. I have flailed trying to get it right, and still get a type mismatch error when I call the method. Can someone please provide a "hello world" example that uses dtstask.execute? Thanks much in advance. If you wish to reply to me directly, you may email v- normb (AT) foobar (DOT) com, where foobar = the name of the world's biggest software company (the makers of sql server, bless and curse them). Thanks again, nb |
![]() |
| Thread Tools | |
| Display Modes | |
| |