![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
DTS packages can be excuted "manually", or it can be run automatically (for example as a scheduled job under SqlServerAgent). Question: Can I easily, in an ActiveX script task (VbScript), test for what "kind of" execution enviromment the package is executed under? What I want is to prompt for som additional information when a user-interface is available. If run automatically, such prompting will force the execution to stop - waiting for an answer. Thanks for your help. Ronald |
#3
| |||
| |||
|
|
I really don't think this can be done. There is no hook back out to the calling application for you to query the identity from. Obviously workaround is to ask the questions in the calling app instead and pass in the answers to the package. DTS is a just like any other COM object. How can you determine the caller from within a COM object? Maybe there is some strange stack API call around.. ? This at the least would require a custom component which may confuse it further by adding another layer. -- Darren Green http://www.sqldts.com "Ronald Kloverod" <ronald.kloverod (AT) xexcom (DOT) no> wrote in message news:uv6eFRgeEHA.2804 (AT) TK2MSFTNGP11 (DOT) phx.gbl... DTS packages can be excuted "manually", or it can be run automatically (for example as a scheduled job under SqlServerAgent). Question: Can I easily, in an ActiveX script task (VbScript), test for what "kind of" execution enviromment the package is executed under? What I want is to prompt for som additional information when a user-interface is available. If run automatically, such prompting will force the execution to stop - waiting for an answer. Thanks for your help. Ronald |
#4
| |||
| |||
|
|
Thanks anyway, Darren. I asked because I feel quite sure (if I remember correctly) that Excel can tell me this. So a workaround is for sure to launch an Excel-component, and ask.. Though, I cannot be sure that Excel is installed on the machine, that's why I was searching for another way of doing this. If anyone could know how Excel does this, I should be happy.... :-) Ronald. "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:OKWsi0heEHA.724 (AT) TK2MSFTNGP10 (DOT) phx.gbl... I really don't think this can be done. There is no hook back out to the calling application for you to query the identity from. Obviously workaround is to ask the questions in the calling app instead and pass in the answers to the package. DTS is a just like any other COM object. How can you determine the caller from within a COM object? Maybe there is some strange stack API call around.. ? This at the least would require a custom component which may confuse it further by adding another layer. -- Darren Green http://www.sqldts.com "Ronald Kloverod" <ronald.kloverod (AT) xexcom (DOT) no> wrote in message news:uv6eFRgeEHA.2804 (AT) TK2MSFTNGP11 (DOT) phx.gbl... DTS packages can be excuted "manually", or it can be run automatically (for example as a scheduled job under SqlServerAgent). Question: Can I easily, in an ActiveX script task (VbScript), test for what "kind of" execution enviromment the package is executed under? What I want is to prompt for som additional information when a user-interface is available. If run automatically, such prompting will force the execution to stop - waiting for an answer. Thanks for your help. Ronald |
![]() |
| Thread Tools | |
| Display Modes | |
| |