Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change steps name ?

Status
Not open for further replies.

jack157

Programmer
Nov 28, 2004
1
FR
Hello,

I'd like to change steps name with an activex script (visual basic activex). I have used the following code but the problem is I obtain error message when i try to open the step. The message is "Unable to find step" (with the old name).

Here is my code :

Dim oPkg, s
Set oPkg = DTSGlobalVariables.Parent

for each s in oPkg.steps
s.Properties("Name").Value="Exec Package "+s.Properties("Description").Value
next



Thanks for ur help!

 
To rename steps requires quite a lot. You also have to change the stepnames in other steps precendences to keep your workflow valid, which means you'd have to loop through precedences and change there to the new step name that is current in your upper loop.

But just that isn't enough, what happens too is that layout information in dts designer will corrupt, because designer has connected the layout icons to the step names, which it won't find. There is no way to access designer layout information programmatically, so the only way is to save the package as new in the same vbscript code. Well doing that, the layout information of the package is lost and new package will open with default layout.

When I realised these, I thought why bother ..

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top