all groups > sql server dts > july 2006 >
You're in the

sql server dts

group:

[Help] How to retrieve this value in activex?


[Help] How to retrieve this value in activex? Sphenixs NO[at]SPAM gmail.com
7/6/2006 11:56:41 PM
sql server dts: 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
Re: [Help] How to retrieve this value in activex? Davide Rossetti
7/7/2006 12:00:00 AM
Hello Sphenixs@gmail.com,

[quoted text, click to view]


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

Re: How to retrieve this value in activex? Sphenixs NO[at]SPAM gmail.com
7/7/2006 7:40:42 AM
Woot, u are so helpful
I'll try once I get back into my office

Google Roxz
AddThis Social Bookmark Button