dbTalk Databases Forums  

package won't stop on failure

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


Discuss package won't stop on failure in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan D.
 
Posts: n/a

Default package won't stop on failure - 01-27-2005 , 03:17 PM






Using SS2000 SP3a. I have a step in a package where I check for the existence
of a file. If the file is not there, I want the package to stop but it
doesn't. I've set "fail package on first error in package properties. The
code in the step is this:
Function Main()
Set fso=createobject("scripting.filesystemobject")
If fso.fileexists("G:\Import\mission_weekly.txt") then
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_Failure
End If
Set fso = nothing
End Function

What am I doing wrong?
Thanks,
--
Dan D.

Reply With Quote
  #2  
Old   
Francesco Anti
 
Posts: n/a

Default Re: package won't stop on failure - 01-28-2005 , 03:09 AM






I can't see anything wrong....i made some examples with ActiveX task and the
package stops.
Try, if it's possible in your package, using "On Success" Workflow

Francesco Anti

"Dan D." <DanD (AT) discussions (DOT) microsoft.com> wrote

Quote:
Using SS2000 SP3a. I have a step in a package where I check for the
existence
of a file. If the file is not there, I want the package to stop but it
doesn't. I've set "fail package on first error in package properties. The
code in the step is this:
Function Main()
Set fso=createobject("scripting.filesystemobject")
If fso.fileexists("G:\Import\mission_weekly.txt") then
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_Failure
End If
Set fso = nothing
End Function

What am I doing wrong?
Thanks,
--
Dan D.



Reply With Quote
  #3  
Old   
Dan D.
 
Posts: n/a

Default Re: package won't stop on failure - 01-28-2005 , 06:53 AM



I already have a step after this one based on "On Success" and it always goes
to that step even when there is no file. This is the third step of about 20
steps in the process.

"Francesco Anti" wrote:

Quote:
I can't see anything wrong....i made some examples with ActiveX task and the
package stops.
Try, if it's possible in your package, using "On Success" Workflow

Francesco Anti

"Dan D." <DanD (AT) discussions (DOT) microsoft.com> wrote in message
news:7027DFE9-240D-4515-A67C-F231D9191939 (AT) microsoft (DOT) com...
Using SS2000 SP3a. I have a step in a package where I check for the
existence
of a file. If the file is not there, I want the package to stop but it
doesn't. I've set "fail package on first error in package properties. The
code in the step is this:
Function Main()
Set fso=createobject("scripting.filesystemobject")
If fso.fileexists("G:\Import\mission_weekly.txt") then
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_Failure
End If
Set fso = nothing
End Function

What am I doing wrong?
Thanks,
--
Dan D.




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.