Bandwidth Monitor
SQLDTS.comSQLIS.comSQLIS Wiki
How to Use Lookups in DTS
By Allan Mitchell
Version 7.0/2000
Level Intermediate
Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Page 7 | Page 8 | Page 9

Figure 1.6 clearly shows our ActiveX Script completed using the values retrieved from the Lookup

Figure 1.6 Active X Completed

AX Complete

Let's have a quick run through of what the script means. We start be declaring a local variable arrAuthorStuff. In VBScript you cannot assign a datatype to a variable so everything starts out life as a Variant. We then leave the Source column au_id going to the destination of AuthorID. Now to the interesting part. We execute the Lookup and read the values into the local variable. We pass to the lookup the value of the Source au_id column. This has the effect of making the variable an array , with a base value of 0. The variable now holds the author's first name and last name so we can now seperate the values from the array which we do in the script shown.

Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Page 7 | Page 8 | Page 9