Groups | Blog | Home
all groups > sql server dts > june 2004 >

sql server dts : Modify DTS Package from Visual Basic


krutyihoriok NO[at]SPAM hotmail.com
6/25/2004 12:27:51 PM
Hello. I'm trying to find out if it is possible for me to create some
sort of a function to automatically modify a DTS package in a given
SQL database. For example, I have 4 MS Access databases containing
tables that I need to modify slightly and pull into one table in an
SQL database. All 4 have the same fields and rules, they were just
separated by the software for some reason. Either way, some day there
will be an update to that software, a 5th, 10th file will appear. I
want to have a program which asks for a new Access database name, then
makes a new connection to it in the existing DTS package and uses an
already existing ActiveX script to import the fields into a table in
SQL. In a sense, it would automate what can be done pretty quickly in
Nigel Rivett
6/26/2004 11:21:01 AM
Sure you can change anything in the package from VB - you can even create it from scratch then run it.
Save the package to a VB file to see how to create and access properties.
After that play around with loading and looking at properties from VB.

My advice would be to think about what you want to be configurable and what to code in the package. You could just create everything from VB but that wouldn't probably be a good idea.
I usually configure in an activex script withing the package to keep it self contained.
And put anything generic that I need across all packages (setting server, databases, ...) in a loader.

[quoted text, click to view]
AddThis Social Bookmark Button