Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Remove all transformations and redo auto-mapping

Author  Topic 

sql4sam
Starting Member

5 Posts

Posted - 2003-04-20 : 13:20:40
Remove all transformations and redo auto-mapping (programmitcally)

Hi, Is there a way to automate the transformation task so that the source table is mapped correctly to the destination table. The reason for this is that I would like to allow users to enter or select a source table and a destination table, this information is passed to SQL server by global variables but the data pump task fails because the transformation task has the old mapping between the source and destination, and if this is remapped manually using the DTS designer, once I click on the Transformations tab I a message box appears with three options:
- Remove invalid transformations
- Change source/destination
- Remove all transformations and redo auto-mapping

By clicking the last option the DTS package will work fine. So is there a way to use "Remove all transformations and redo auto-mapping"
programmitcally. Please note that I am using ASP (VB Script) to execute the DTS pacakge and pass the global variables.

Thanks in advance!

Sam

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-04-20 : 15:27:25
You can script out the DTS package and execute it from ASP or VB.
or you can create an DTS package with an activex task that is the DTS package you are trying to run now but it accepts global variables.

A good source for dts info is
www.sqldts.com

Go to Top of Page

sql4sam
Starting Member

5 Posts

Posted - 2003-04-20 : 15:37:51
Hi thanks for the reply! Seen as I am a newbie at this sql I hope you can provide me with some extra details or examples. I have been to the site you gave me and looked at nearly all of the tutorials and tasks but none satisfies my requirements.

I need the DTS package to be flexible, I am running the DTS package using ASP and it is working fine I also have some global variables that allow users to change some values in the transformation.

I then created two new global variables, one for the source database and the other is for the imported file (destination). The only problem here is when this changed from the default value it wont work and I will get a data pump error.

As I explained before once I remove all the transformation and redo the mapping it will work fine, and that same process must be done when either the source or the destination is changed. This process can esily be done in the GUI but I need to do it either in activex or on the asp page.

You were talking about activex?!!! Can you give me more help.

Thanks!

Go to Top of Page

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-04-20 : 17:27:47
Can you script out your DTS package by saving the package as vb.

Also post some ddl and dml for us to create look at.



Go to Top of Page
   

- Advertisement -