dbTalk Databases Forums  

DTS - Task ActiveX Error

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


Discuss DTS - Task ActiveX Error in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dnaveran via SQLMonster.com
 
Posts: n/a

Default DTS - Task ActiveX Error - 07-01-2005 , 05:18 PM






Please , I need help.

I need a DTS where it is necessary to be able to determine if a file exists
and if the file does not exist that sends to a mail but nonprofit that before
a fault (DTSTaskExecResult_Failure) follows the fault way until shooting the
mail.



Task 1 ----ON FAILURE-----> Send Mail Task
----ON SUCCESS-----> Task 2

The code TASK1 is :

Function Main()

Dim oFSO, sFileName
sFilename = "c:\temp\temp.00"
Set oFSO = CreateObject("Scripting.FileSystemObject")
If oFSO.FileExists(sFilename) Then
Main = DTSTaskExecResult_Success
else
Main = DTSTaskExecResult_Failure
end if
Set oFSO = Nothing
End Function

but The error is :

Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:The task reported failure on execution.
Step Error code: 8004043B
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:1100



Regards

DNaveran

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS - Task ActiveX Error - 07-02-2005 , 04:37 AM






Well if the file doesn't exist then you have told the task to fail.

Personally I would look to workflow because I dislike failing a task
deliberately when it didn't really fail.

Have a look here

Multiple Paths in Workflow
(http://www.sqldts.com/default.aspx?218)

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"dnaveran via SQLMonster.com" <forum (AT) SQLMonster (DOT) com> wrote

Quote:
Please , I need help.

I need a DTS where it is necessary to be able to determine if a file
exists
and if the file does not exist that sends to a mail but nonprofit that
before
a fault (DTSTaskExecResult_Failure) follows the fault way until shooting
the
mail.



Task 1 ----ON FAILURE-----> Send Mail Task
----ON SUCCESS-----> Task 2

The code TASK1 is :

Function Main()

Dim oFSO, sFileName
sFilename = "c:\temp\temp.00"
Set oFSO = CreateObject("Scripting.FileSystemObject")
If oFSO.FileExists(sFilename) Then
Main = DTSTaskExecResult_Success
else
Main = DTSTaskExecResult_Failure
end if
Set oFSO = Nothing
End Function

but The error is :

Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:The task reported failure on execution.
Step Error code: 8004043B
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:1100



Regards

DNaveran



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.