Groups | Blog | Home
all groups > sql server dts > april 2004 >

sql server dts : Order of Steps


Ananth
4/26/2004 9:06:03 PM
Hello

I have a DTS package with several steps and am trying to provide a front-end for the user which wil
list the steps and show a progress bar on executing each step (very similar to the one provided by SQL Serve
itself)...however, I do not seem to get the steps IN ORDER..FYI, I am using C# (WinForms)..

The interface provided by SQL Server seems to pick the steps in the right order...on searching, it seems tha
we can evaluate the PrecedenceConstraints property to get the right order..Since I'm a newbie to DTS, any hel
/sample (in any language) to retrieve the list of steps IN ORDER would be useful

Than
Darren Green
4/27/2004 10:19:30 PM
In message <DE54484B-99F6-4876-9901-0194241CEC17@microsoft.com>, Ananth
<anonymous@discussions.microsoft.com> writes
[quoted text, click to view]

Why not take a simper approach and only populate your progress list as
tasks start executing. You could drive this quite happily off events.

To determine order of execution you would need to enumerate all steps as
constraints are held by the task they go to, not from.

For each step, enumerate the PrecedenceConstraints collection, to get
the PrecedenceConstraint objects. The StepName is the preceding step, So
if a step as no PrecedenceConstraints it is the start step. Not sure
that this guaranteed to 100 accurate either as in theory you can change
the basis and result to in effect be a "On Preceeding Step Not Run", and
have a circular reference, but I suspect DTS itself may have the same
problem as you in this case, so probably not worth worrying about for
the start step, but perfectly valid elsewhere.




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

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