Russel, Thank you so much. I changed the
DestinationObjectName and SourceObjectName for the tasks
in the disconnect edit menu choice and it works great.
It's a great help already but is there anyway I can have
that as default so I don't have to change for every
DTSTask_DTSDataPumpTask_1
DTSTask_DTSDataPumpTask_2
DTSTask_DTSDataPumpTask_3, etc
Now, I'm working in the ActiveX Script. Thanks again!
[quoted text, click to view] >-----Original Message-----
>Before diving into your issue, I have noticed that when
Microsoft creates the target table in a transformation, it
appends the database name. I would think that simply
using TableName or dbo.TableName syntax would allow you to
move the package from one database to another by simply
changing the connection properties.
[quoted text, click to view] >
>You can change the source table name and the target table
name in the disconnected edit menu option to change the
source table name so that it has the syntax dbo.TableName,
removing the database name entirely. You have to find the
task (not the step) that corresponds to your
transformation. Then you must find the SourceObjectName
and the DestinationObjectName. You remove reference to
the database and let DTS use the package connection
information.
[quoted text, click to view] >
>Or you can use an activex script:
>
>
>'*********************************************************
*************
>' Visual Basic ActiveX Script
>'*********************************************************
***************
>
>Function Main()
>
>dim myTask
>set myTask = DTSGlobalVariables.Parent.Tasks("Copy Data
from DeclineList to [RussExperimental].[dbo].[DeclineList]
Task")
[quoted text, click to view] >dim sTable
>dim sDB
>dim iPos
>sTable = myTask.CustomTask.DestinationObjectName
>sDB = DTSGlobalVariables("DestinationDB").Value
>iPos = instr(1,sTable,".")
>if iPos > 0 then
> myTask.CustomTask.DestinationObjectName = sDB & mid
(sTable,iPos)
>end if
>
>' Do the same with the SourceObjectName
>
> Main = DTSTaskExecResult_Success
>End Function
>
>
>Russel Loski, MCSD
>.