'********************************************************************** ' Visual Basic ActiveX Script '************************************************************************ Function Main() Dim P ' Package2 Set P = DTSGlobalVariables.Parent DTSPackageLog.WriteStringToLog "Global Variables ________________" For EACH GV IN P.GlobalVariables 'DTSPackageLog.WriteStringToLog is neater in the text file (it does not preface it with "Error = 1 (00000001), Description = " 'DTSPackageLog.WriteTaskRecord 1 is neater in the SQL DTS Package Log -- each step shows up with a green check instead of a red X DTSPackageLog.WriteTaskRecord 1, ifNull(GV.NAME) & " Value: " & ifNull(GV.Value) Next DTSPackageLog.WriteTaskRecord 1, "Connections ________________" For EACH cn IN P.Connections DTSPackageLog.WriteTaskRecord 1, cn.Name & " Source: " & ifNull(cn.DataSource ) & " Catalog: " & ifNull(cn.Catalog ) Next DTSPackageLog.WriteTaskRecord 1, "Task Names ________________" For EACH tsk IN P.Tasks DTSPackageLog.WriteTaskRecord 1, tsk.Name & " " & tsk.Description Next Main = DTSTaskExecResult_Success End Function Function ifNull(test) IF ISNULL( test) THEN DTSPackageLog.WriteStringToLog "Found a null" ifNull = "" ELSE ifNull = test END IF End Function