August 28, 2002 at 1:41 pm
Does anyone know how to change the destination of a DTS package programmatically in VB? I would like to be able to have it changed dynamically each time it is run.
Thanks in advance.
August 28, 2002 at 2:49 pm
Usually not too hard to do. Start by saving out the package as VB code, then look through to find exactly where in the code the property is getting set that has the location. Once you know that, then you can set a reference to the DTS library in VB, open the package, alter the property, then save the package.
Andy
August 28, 2002 at 4:11 pm
quote:
Usually not too hard to do. Start by saving out the package as VB code, then look through to find exactly where in the code the property is getting set that has the location. Once you know that, then you can set a reference to the DTS library in VB, open the package, alter the property, then save the package.Andy
http://www.sqlservercentral.com/columnists/awarren/
Good idea.
Thanks.
August 28, 2002 at 6:05 pm
You want to specify a destination file dynamically? You could also look into the dynamic properties task...with that you can set a global variable dynamically and set your transformation task destination to the global variable. Also, you could set the destination dynamically via an ActiveX task...if you think this would fit what you need to do and you want some direction, let me know and I have some code I can send to you that would get you started at least..
hth,
Michael
Michael Weiss
Michael Weiss
August 28, 2002 at 6:11 pm
quote:
You want to specify a destination file dynamically? You could also look into the dynamic properties task...with that you can set a global variable dynamically and set your transformation task destination to the global variable. Also, you could set the destination dynamically via an ActiveX task...if you think this would fit what you need to do and you want some direction, let me know and I have some code I can send to you that would get you started at least..hth,
Michael
Michael Weiss
This looks great as well. If you could email me the code, i would greatly appreciate it.
Thanks
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply