Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 oPackage.Steps

Author  Topic 

sardinka
Posting Yak Master

142 Posts

Posted - 2004-11-17 : 09:56:03
I have the following code where I am executing the steps. My problem is how do I not execute the steps and set the DTSTaskExecResult as Success?
If DateDiff("h", File.DateLastModified, Now ) <= 24 Then
Set oPackage = DTSGlobalVariables.Parent
oPackage.Steps("DTSStep_DTSExecuteSQLTask_1").Execute
oPackage.Steps("DTSStep_DTSDataDrivenQueryTask_1").Execute
else
????
End if
Main = DTSTaskExecResult_Success
End if

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-11-17 : 10:03:00
something liek this?

If DateDiff("h", File.DateLastModified, Now ) <= 24 Then
Set oPackage = DTSGlobalVariables.Parent
oPackage.Steps("DTSStep_DTSExecuteSQLTask_1").Execute
oPackage.Steps("DTSStep_DTSDataDrivenQueryTask_1").Execute
Main = DTSTaskExecResult_Success
else
Main = DTSTaskExecResult_Failed
End if



Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -