O'Reilly logo

Guru's Guide to SQL Server Architecture and Internals, The by Ken Henderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling Package Workflow through Scripting

I mentioned earlier that you can control the workflow of a package by using ActiveX script code. An obvious need for this type of functionality is in implementing loops within a package. There are multiple ways to go about this. I'll walk you through a few of them, and you can decide which of them best meets your needs.

Looping by Using a Separate Package

The easiest way to implement looping behavior within a DTS package is to put the steps that you want to execute repetitively in a separate package and use a simple ActiveX script to execute it as many times as necessary. Listing 20.6 shows an example of an ActiveX Script task that loops a set number of times, executing a second package with each ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required