dbTalk Databases Forums  

[Help] How to retrieve this value in activex?

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


Discuss [Help] How to retrieve this value in activex? in the microsoft.public.sqlserver.dts forum.



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

Default [Help] How to retrieve this value in activex? - 07-07-2006 , 01:56 AM






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").CustomTas k

DTS.Tasks("DTSTask_DTSExecuteSQLTask_1").CustomTas k.connectionID = 4
..
..
..

End Function

but how to retrieve the value from transformation in activex?
http://img.photobucket.com/albums/v2...x/288162fd.jpg


Reply With Quote
  #2  
Old   
Davide Rossetti
 
Posts: n/a

Default Re: [Help] How to retrieve this value in activex? - 07-07-2006 , 06:58 AM






Hello Sphenixs (AT) gmail (DOT) com,

Quote:
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").CustomTas k

DTS.Tasks("DTSTask_DTSExecuteSQLTask_1").CustomTas k.connectionID = 4
.
.
.
End Function

but how to retrieve the value from transformation in activex?
http://img.photobucket.com/albums/v2...x/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

Bye




Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: How to retrieve this value in activex? - 07-07-2006 , 09:40 AM



Woot, u are so helpful
I'll try once I get back into my office

Google Roxz


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.