dbTalk Databases Forums  

Modify DTS Package from Visual Basic

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Modify DTS Package from Visual Basic in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Igor Solovey
 
Posts: n/a

Default Modify DTS Package from Visual Basic - 06-25-2004 , 02:27 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
DTS editor in Enterprise Manager. Can anyone help?

Reply With Quote
  #2  
Old   
Nigel Rivett
 
Posts: n/a

Default RE: Modify DTS Package from Visual Basic - 06-26-2004 , 01:21 PM






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.

"Igor Solovey" wrote:

Quote:
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
DTS editor in Enterprise Manager. Can anyone help?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.