![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi! So, if the file byte size is zero (first task), I need the entire package to be exit (dont do anything else). I am using this ActiveX script: Function Main() Dim fso, filepath, filesize Set fso = CreateObject("Scripting.FileSystemObject") Set filepath = fso.GetFile("c:\foobar\blah.txt") filesize = filepath.Size MsgBox(filesize) If filesize = 0 Then 'QUIT Else ' Go to the next task which is Execute SQL task Main = DTSTaskExecResult_Success End If End Function This script is giving the correct file size but I dont know how to exit from the entire package (or skip all other tasks)? Can anyone help? Thanks for your help. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
MJ, It works but at the same time it is giving me an error message saying "The task reported failure on execution". Any idea how to handle this? In my DTS pcakage, after this ActiveX script task, I have set up two "Execute SQL" tasks. One is with the success work flow (file size = 0, do a dummy query) and one is with the failure work flow (do actutal query whihc is exec stored proc). Thanks, |
#5
| |||
| |||
|
|
MJ, It works but at the same time it is giving me an error message saying "The task reported failure on execution". Any idea how to handle this? In my DTS pcakage, after this ActiveX script task, I have set up two "Execute SQL" tasks. One is with the success work flow (file size = 0, do a dummy query) and one is with the failure work flow (do actutal query whihc is exec stored proc). Thanks, *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
![]() |
| Thread Tools | |
| Display Modes | |
| |