ametuer999
asked on
Refering Parent object
Set Package = DTSGlobalVariables.Parent
Set Steps = Package.Steps
I have the above code in one of my packages..i copied the same code in active x script task..i have no other go right now..my question is can i continue with the same code after migration also..means will this code refer to my migrated ssis package as parent...if not is there any other way to do this?..i really have lots of hopes on Expert-Exchange..any help ASAP..highly apppriciated..Thanks in advance..
Set Steps = Package.Steps
I have the above code in one of my packages..i copied the same code in active x script task..i have no other go right now..my question is can i continue with the same code after migration also..means will this code refer to my migrated ssis package as parent...if not is there any other way to do this?..i really have lots of hopes on Expert-Exchange..any help ASAP..highly apppriciated..Thanks in advance..
In DTS you could rely on ActiveX to enable and disable steps. It was the only way to Loop and end Loops. You could also handle the precedence in ActiveX. But in SSIS it is completely different. None of this is done in ActiveX. My suggestion is to rebuild the same logic in SSIS. Do you know the logic from the ActiveX script (understand it)?
ASKER
Thank you ,no i dont know..i am a new bee..can you please let me know how to do that...
Sure, let's walk through the entire requirement. What does the DTS Package do? This will be the outline for the new SSIS package.
Set Package = DTSGlobalVariables.Parent
Set Steps = Package.Steps
Let's start with the above, what are they being used for in the package?
Set Package = DTSGlobalVariables.Parent
Set Steps = Package.Steps
Let's start with the above, what are they being used for in the package?
ASKER
this is the code i have,can you analyze and try to recode in vb.net
'************************* ********** ********** ********** ********** *****
' Visual Basic ActiveX Script
'************************* ********** ********** ********** ********** *******
Function Main()
' This makes sure that the text field ApplicationProfile in table BulkRequestDataLoad_CPoint matches field ProfileLable
' in table tbl_Profile for the application.
Dim Package, Step, Steps
Dim pkg
Dim step1
Dim step2
' First thing we need to do is to check if our directories are valid.
************************** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ******
SET pkg = DTSGlobalVariables.Parent
SET step1= pkg.Steps("DTSStep_DTSExec uteSQLTask _5")
SET step2 = pkg.Steps("DTSStep_DTSExec uteSQLTask _6") '(how to refer like this after migration?)'
************************** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ******
If DTSGlobalVariables("gv_Pro file").Val ue > 0 Then
step1.DisableStep = False
step2.DisableStep = False
Main = DTSTaskExecResult_Success
Else
' Check for valid ProID
If isEmpty(DTSGlobalVariables ("gv_ProID ").Value) Then
call DisplayGlobals
stpDeleteNull.DisableStep = True
stpProcessBulkLoad.Disable Step = True
************************** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ******
Set Package = DTSGlobalVariables.Parent '(Is this code valid for migrated SSIS package also)'
Set Steps = Package.Steps
************************** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** *******
For Each Step in Steps
Step.ExecutionStatus = DTSStepExecStat_Inactive
Next
Set Steps = Nothing
Set Package = Nothing
call DisplayGlobals
Main = DTSTaskExecResult_Failure
Else
step.DisableStep = True
step.DisableStep = True
Set Package = DTSGlobalVariables.Parent
Set Steps = Package.Steps
For Each Step in Steps
Step.ExecutionStatus = DTSStepExecStat_Inactive
Next
call DisplayGlobals
Main = DTSTaskExecResult_Failure
End If
End If
End Function
Public Function DisplayGlobals ()
'call DisplayGlobals
Dim msg, X
End Function
'*************************
' Visual Basic ActiveX Script
'*************************
Function Main()
' This makes sure that the text field ApplicationProfile in table BulkRequestDataLoad_CPoint
' in table tbl_Profile for the application.
Dim Package, Step, Steps
Dim pkg
Dim step1
Dim step2
' First thing we need to do is to check if our directories are valid.
**************************
SET pkg = DTSGlobalVariables.Parent
SET step1= pkg.Steps("DTSStep_DTSExec
SET step2 = pkg.Steps("DTSStep_DTSExec
**************************
If DTSGlobalVariables("gv_Pro
step1.DisableStep = False
step2.DisableStep = False
Main = DTSTaskExecResult_Success
Else
' Check for valid ProID
If isEmpty(DTSGlobalVariables
call DisplayGlobals
stpDeleteNull.DisableStep = True
stpProcessBulkLoad.Disable
**************************
Set Package = DTSGlobalVariables.Parent '(Is this code valid for migrated SSIS package also)'
Set Steps = Package.Steps
**************************
For Each Step in Steps
Step.ExecutionStatus = DTSStepExecStat_Inactive
Next
Set Steps = Nothing
Set Package = Nothing
call DisplayGlobals
Main = DTSTaskExecResult_Failure
Else
step.DisableStep = True
step.DisableStep = True
Set Package = DTSGlobalVariables.Parent
Set Steps = Package.Steps
For Each Step in Steps
Step.ExecutionStatus = DTSStepExecStat_Inactive
Next
call DisplayGlobals
Main = DTSTaskExecResult_Failure
End If
End If
End Function
Public Function DisplayGlobals ()
'call DisplayGlobals
Dim msg, X
End Function
It appears all this code is doing is directing the flow. Can you tell me what the package needs to do? In SSIS we may not even need a vb.net script.task.
ASKER
Thanks for responding even on weekends.
ASKER
i cant simply explain the purpose in a few words..can you please guide me how to attach my ssis project ,which i have already migrated and stuck at this task..i tried to attach it..but i guess you cant open and look into it...thanks again for bearing with me..
ASKER
I attach two packages with .txt extension.I think you can change the extension to .dtsx and view them..Import package calls Requests package as a child package..could you please have look and analyze
Import.txt
Requests.txt.txt
Import.txt
Requests.txt.txt
I will be looking at this tonight an tomorrow. Thanks.
ASKER
Thanks In Advance HoggZilla...!
Sorry for the delay. I will get something to you today. :-)
ASKER
no problem sir..take your time..i will be very grateful for you if you could make me learn a solution to get out of this problem...THANK YOU....
ASKER
Hi could you please..........
ASKER
I still need your help sir...
I am so sorry. I have been out of the office. Back today and I will get this done. Once again, very sorry.
Steve
Steve
ASKER
No problem sir...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.