imanym
asked on
"The task reported failure on execution", SUCCESS precedence fails. WHY?
-- strFolderName successfully retrieves a number from a field in a table. That field is a varchar field. The data is always a number and I need to return "SUCCESS" if the number is lower than 998 or "FAILURE" is that number is not.
I have this code in an Active Script Task in a DTS package. The task runs successfully and since at this point the number IS under 998 failure 'precedence' is not called. The success 'precedence' is called but fails with the "The task reported failure on execution" error.
Can anyone help me out with this please? I don't understand what this error means since the task does run successfully. Or is there an error in my code?
THANK YOU VERY MUCH IN ADVANCE FOR YOUR HELP!!!
I have this code in an Active Script Task in a DTS package. The task runs successfully and since at this point the number IS under 998 failure 'precedence' is not called. The success 'precedence' is called but fails with the "The task reported failure on execution" error.
Can anyone help me out with this please? I don't understand what this error means since the task does run successfully. Or is there an error in my code?
THANK YOU VERY MUCH IN ADVANCE FOR YOUR HELP!!!
.
.
.
SECTION_NAME = 'Refresh' AND KEY_NAME = 'NextDataFileGroup'"
Recordset.Open strSQL, Conn
Do While NOT Recordset.EOF
strFolderName = Recordset("KEY_NAME_VALUE")
Recordset.MoveNext
Loop
Recordset.Close
Set Recordset=Nothing
Conn.Close
Set Conn=Nothing
If cInt(strFolderName) < 998 Then
Main = DTSTaskExecResult_Success
End If
End Function
Well for one you are not explicitly setting the DTSTaskExecResult_Failure, but I suspect the problem is elsewhere. You need to post your DTS diagram here so that we can get a better understanding of what you are trying to accomplish.
ASKER
This is my DTS diagram
diagram.bmp
diagram.bmp
Ok. I think I understand now what you are trying to achieve and yes you are right if strFolderName < 998 there has to be an error in your code. What I would suggest you do is enable "Turn on just-in-time debugging" (right click on the Data Transformation Services and select Properties) and add appropriate Stop statements to narrow down the problem. Alternatively, add a few MsgBox's to narrow down the problem.
If all else fails, post the entire code from your ActiveX Script Task.
You should also know that there may be better ways of skining this cat, but let's get to the bottom of this first.
If all else fails, post the entire code from your ActiveX Script Task.
You should also know that there may be better ways of skining this cat, but let's get to the bottom of this first.
ASKER
Thanks very much for helping me out on this.
I turned on the debugging, activeX script still executes successfully without any errors.
The SMTP task gets called on succes, but fails on execution.
I turned on the debugging, activeX script still executes successfully without any errors.
The SMTP task gets called on succes, but fails on execution.
>>I turned on the debugging, activeX script still executes successfully without any errors.<<
Did you add a Stop and step through it to make sure it executes correctly?
>>The SMTP task gets called on succes, but fails on execution.<<
Have you tried executing that task on its own? Perhap it is a problem with that task and how you have email setup.
Did you add a Stop and step through it to make sure it executes correctly?
>>The SMTP task gets called on succes, but fails on execution.<<
Have you tried executing that task on its own? Perhap it is a problem with that task and how you have email setup.
ASKER
Did try that, executes successfully.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>Solved the problem myself, looks like.<<
Yeah, right. Whatever.
Yeah, right. Whatever.