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.
Author |
Topic |
MRathbun
Starting Member
1 Post |
Posted - 2009-05-26 : 11:51:43
|
I have the below script in a old DTS Package I converted to SSIS. I do not think the "Main = DTSTaskExecResult_Failure" part is working. It never errors out like it should. Can someone please tell me if this is not longer a valid command in SSIS and what I could use instead.?All it does is tell me whether a file name was found in the file location or not. If not found go to failure task, if found continue. Thank you.Function Main() on error resume next Dim myFSO 'As Scripting.FileSystemObject Set myFSO = CreateObject("Scripting.FileSystemObject") 'Note: Set file specific attributes via the package gloval variables. if myFSO.FileExists( DTSGlobalVariables("DataFileDir").Value & DTSGlobalVariables("NextFileName").Value ) then DTSGlobalVariables("NextFileFound").Value = 1 Main = DTSTaskExecResult_Success else DTSGlobalVariables("NextFileFound").Value = 0 Main = DTSTaskExecResult_Failure end ifEnd Function |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-26 : 12:10:48
|
try this instead Dts.TaskResult = Dts.Results.Success & Dts.TaskResult = Dts.Results.Failure |
 |
|
|
|
|