Exposing DTS Package properties

  • How do I get the current package name (and other package/task properties) into an executing package (global variable?) so that I can use it for error handling and custom logging? I'd like to be able to access package properties within a multi-phase pump filter transform (ActiveX script) while Data Transform and Data Driven Tasks are starting/completing. If I can get these properties, I can write to a control table and know exactly what is happening at practically anytime during package execution. I can't use package logging because I will be running these packages via DTSRUN and I prefer to customize the data I capture anyway.

  • don't see a way to access this. To even get a reference to the package, you must have the name to load it. Can you not just set a global variable with the name?

    Steve Jones

    steve@dkranch.net

  • I found it about two minutes after I posted the question. An example is presented below. I could have set a global variable but then I would be maintaining the name in multiple places. This is not something I particularly wanted to do. Thank you for your prompt reply!

    Function Main()

    Dim oPkg

    Set oPkg = DTSGlobalVariables.Parent

    msgbox(oPkg.name)

    Main = DTSTaskExecResult_Success

    End Function

  • You're welcome and thanks for the followup. BTW, where did you find this?

    Steve Jones

    steve@dkranch.net

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply