obtaining a reference to the current package

  • Hi!

    Is it possible to obtain from within an ActiveX task a reference to the current package running? So that, for example, I could set the log filename dynamically?

    Thanks in advance!

  • Dim objPkg

     ' Get Package object

     Set objPkg = DTSGlobalVariables.Parent

     

    This will get you a reference to the package itself. Then you can access all the properties you just mind have to google ad dig around for what you need syntax wise. I have no test machin here so if you need more help leave a message and I can check after work next week in my test environment.

  • Thanks, your advice worked!

    Didn't have to dig around with Google though. I saved the package as a VB file and then snooped around in there for the code. I'ts actually accessible as a property of the package object. For those who want to know, it's

    objPkg.LogFileName

    E.g., objPkg.LogFileName = CStr(Date) + ".log"

    Again, thanks, Antares686.

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

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