Hello Sphenixs@gmail.com,
[quoted text, click to view] > This is the code where I retrieve the value from the task
>
> '*********************************************************************
> * ' Visual Basic ActiveX Script
> '*********************************************************************
> ***
>
> Function Main()
>
> Dim DTS, ExecSQL, SQLStatement
> Set DTS = DTSGLOBALVARIABLES.Parent
> Set ExecSQL = DTS.Tasks("DTSTask_DTSExecuteSQLTask_1").CustomTask
>
> DTS.Tasks("DTSTask_DTSExecuteSQLTask_1").CustomTask.connectionID = 4
> .
> .
> .
> End Function
>
> but how to retrieve the value from transformation in activex?
>
http://img.photobucket.com/albums/v220/sphenix/288162fd.jpg >
try this script
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
dim myPkg 'As Package
dim myTask 'As Task
dim myCustomTask 'As CustomTask
dim myTransformation 'As Transformation
dim myColumn 'As DestinationColumn
dim myDataType 'As DataType
set myPkg = DTSGlobalVariables.Parent
set myTask = myPkg.Tasks("DTSTask_DTSDataPumpTask_1")
set myCustomTask = myTask.CustomTask
set myTransformation = myCustomTask.Transformations("DTSTransformation__1")
set myColumn = myTransformation.DestinationColumns("Tx_DT")
''''''' You get it ! ''''''''
myDataType = myColumn.DataType
set myColumn = nothing
set myTransformation = nothing
set myCustomTask = nothing
set myTask = nothing
set myPkg = nothing
Main = DTSTaskExecResult_Success
End Function
By