question

John 6 avatar image
John 6 asked

DTS migration trouble

Hi guys i am trying to make this work but i have no idea of what to do please help me

i need to put this in a script task but ssis do not recognize mi code what can i do?

'**********************************************************************                    
'  Visual Basic ActiveX Script                    
'************************************************************************                    
Function Main()                    
    activo = false                    
                    
    'set  oPkg = DTSGlobalVariables.Parent                    
                    
    'For Each oStep In oPkg.Steps                    
    	nombreTask = oPkg.Tasks(oStep.TaskName).Name                    
    	if mid(nombreTask,1,instrRev(nombreTask,"_")-1) = "DTSTask_DTSDataPumpTask" or mid(nombreTask,1,instrRev(nombreTask,"_")-1) = "DTSTask_DTSExecuteSQLTask" then                    
    		oStep.JoinTransactionIfPresent = activo                    
    		oStep.RollbackFailure = activo                    
    	end if                    
    'next                    
                    
    Main = DTSTaskExecResult_Success                    
End Function                    
ssismigrationdts
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Rajib Bahar avatar image
Rajib Bahar answered

it won't know what oStep.TaskName is when the preceeding line is commented out.

see the line:

'For Each .......

that's where you're defining what oStep object is to contain. Fix that line and you should be fine. I am thinking it's a coding issue.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.