I am completely new to DTS and have been cribbing code from online to run a loop over a number of files whose names/locations are held in a SQL2K db table.

I can change the datapump connection source to take a value from the SQL table as the package loops, but cannot work out which property would change the connection destination table to a value also held in the SQL table.

Please see below:

Dim pkg
Dim conTextFile
Dim stpEnterLoop
Dim stpGetRealTables

set pkg = DTSGlobalVariables.Parent
set stpEnterLoop = pkg.Steps("DTSStep_EnterLoop")
set stpGetRealTables = pkg.Steps("DTSStep_GetTableName")
set conTextFile = pkg.Connections("Text File (Source)")

if Loop = True then
stpEnterLoop.DisableStep = False
stpGetRealTables.DisableStep = True
conTextFile.DataSource = DTSGlobalVariables("gv_FullFilePathName").Value
'conTextFile.Table = DTSGlobalVariables("gv_DestTable").Value stpEnterLoop.ExecutionStatus = DTSStepExecStat_Waiting

It is the RED bit that does not work. It was a bit of a guess...

Any help gratefully received. Sniggers ignored.