Bandwidth Monitor
A Tour Of ActiveX
By Allan Mitchell
Version 7.0/2000
Level Beginner
Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6

SQL Server 7 ActiveX Script Task contd..

Let's go into a bit more detail about some of these things.

The check box for adding Global variables is an odd one and can catch you out if you're new to DTS. A Global Variable is a package level variable that can be set and reused in tasks throughout the package. In Figure 1.1 you can see that we've added a piece of VBScript to the window. All this does is displays a messagebox containing the value of a Global variable we've declared gv_ShowDTS.

Our options are to either have this box checked or not. let's look at what happens when we choose either option and run in the script. Uncheck the box.

Figure 1.2 Disallow Global Variables.


As you can see DTS would seem to have no idea what a Global Variable is. Now check the box.

Figure 1.3 Allow Global Variables.


This has put it right. Now we can see the value of the Global Variable in the messagebox.

Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6