• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 978
  • Last Modified:

"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!!!
.
.
.
	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

Open in new window

0
imanym
Asked:
imanym
  • 4
  • 4
1 Solution
 
Anthony PerkinsCommented:
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.
0
 
imanymAuthor Commented:
This is my DTS diagram
diagram.bmp
0
 
Anthony PerkinsCommented:
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.
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
imanymAuthor Commented:
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.
0
 
Anthony PerkinsCommented:
>>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.
0
 
imanymAuthor Commented:
Did try that, executes successfully.
0
 
imanymAuthor Commented:
OK, it looks like it works now.
I though that the "The task reported failure on execution" message was an error, but looks like it is just what the task reports when it is supposed to report the FAILURE.  It looks like the task crashes, but that's just the look of it when it reports failure.  I am not very familiar with VB Sript and that is why I was confused.
Thank you very much for your help!!!
0
 
Anthony PerkinsCommented:
>>Solved the problem myself, looks like.<<
Yeah, right. Whatever.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now