dbTalk Databases Forums  

DTSTaskExecResult constants - error

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


Discuss DTSTaskExecResult constants - error in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bill
 
Posts: n/a

Default DTSTaskExecResult constants - error - 10-10-2003 , 10:12 AM






Can anyone tell me why the following gives me problems.

'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()
dim objFSO, strFullNm
Set objFSO = CreateObject("Scripting.FileSystemObject")

strFullNm = "d:\automate\filename.txt"

If objFSO.FileExists(strFullNm) then
msgbox "The File exists"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Msgbox "No File"
Set objFSO = nothing
Main = DTSTaskExecResult_Failure ------------- THIS LINE ERRORS, but
if I say DTSTaskExecResult_Success it goes through.
End if


End Function



Reply With Quote
  #2  
Old   
Bill
 
Posts: n/a

Default Re: DTSTaskExecResult constants - error - 10-10-2003 , 10:23 AM






Never mind, I found out what I was doing wrong. I didn't have that workflow
defined.


"Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote

Quote:
Can anyone tell me why the following gives me problems.

'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()
dim objFSO, strFullNm
Set objFSO = CreateObject("Scripting.FileSystemObject")

strFullNm = "d:\automate\filename.txt"

If objFSO.FileExists(strFullNm) then
msgbox "The File exists"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Msgbox "No File"
Set objFSO = nothing
Main = DTSTaskExecResult_Failure ------------- THIS LINE ERRORS,
but
if I say DTSTaskExecResult_Success it goes through.
End if


End Function





Reply With Quote
  #3  
Old   
Bill
 
Posts: n/a

Default Re: DTSTaskExecResult constants - error - 10-10-2003 , 10:50 AM



I get an error that says "task reported failure on execution" every time I
try to follow the path of failure as described below.



"Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote

Quote:
Can anyone tell me why the following gives me problems.

'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()
dim objFSO, strFullNm
Set objFSO = CreateObject("Scripting.FileSystemObject")

strFullNm = "d:\automate\filename.txt"

If objFSO.FileExists(strFullNm) then
msgbox "The File exists"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Msgbox "No File"
Set objFSO = nothing
Main = DTSTaskExecResult_Failure ------------- THIS LINE ERRORS,
but
if I say DTSTaskExecResult_Success it goes through.
End if


End Function





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

Default Re: DTSTaskExecResult constants - error - 10-10-2003 , 11:03 AM



Yes that's because you told it to fail the task if the file was not found !

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote

Quote:
I get an error that says "task reported failure on execution" every time I
try to follow the path of failure as described below.



"Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote in message
news:uPUW3D0jDHA.2772 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Can anyone tell me why the following gives me problems.

'************************************************* *********************
' Visual Basic ActiveX Script

'************************************************* ***********************

Function Main()
dim objFSO, strFullNm
Set objFSO = CreateObject("Scripting.FileSystemObject")

strFullNm = "d:\automate\filename.txt"

If objFSO.FileExists(strFullNm) then
msgbox "The File exists"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Msgbox "No File"
Set objFSO = nothing
Main = DTSTaskExecResult_Failure ------------- THIS LINE ERRORS,
but
if I say DTSTaskExecResult_Success it goes through.
End if


End Function







Reply With Quote
  #5  
Old   
Bill
 
Posts: n/a

Default Re: DTSTaskExecResult constants - error - 10-13-2003 , 10:15 AM



I'm a little confused how to control the flow to the next task if the file
is not found. If the file is found I perform a DDQ, if not I want to
end the package with success.



"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Yes that's because you told it to fail the task if the file was not found
!

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote in message
news:utrW1Y0jDHA.2200 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
I get an error that says "task reported failure on execution" every time
I
try to follow the path of failure as described below.



"Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote in message
news:uPUW3D0jDHA.2772 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Can anyone tell me why the following gives me problems.


'************************************************* *********************
' Visual Basic ActiveX Script

'************************************************* ***********************

Function Main()
dim objFSO, strFullNm
Set objFSO = CreateObject("Scripting.FileSystemObject")

strFullNm = "d:\automate\filename.txt"

If objFSO.FileExists(strFullNm) then
msgbox "The File exists"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Msgbox "No File"
Set objFSO = nothing
Main = DTSTaskExecResult_Failure ------------- THIS LINE
ERRORS,
but
if I say DTSTaskExecResult_Success it goes through.
End if


End Function









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

Default Re: DTSTaskExecResult constants - error - 10-13-2003 , 12:22 PM



Simple workflow my dear Watson.

Workflow
(http://www.sqldts.com/default.aspx?103)

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote

Quote:
I'm a little confused how to control the flow to the next task if the file
is not found. If the file is found I perform a DDQ, if not I want to
end the package with success.



"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:#7rKRg0jDHA.1960 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Yes that's because you told it to fail the task if the file was not
found
!

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote in message
news:utrW1Y0jDHA.2200 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
I get an error that says "task reported failure on execution" every
time
I
try to follow the path of failure as described below.



"Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote in message
news:uPUW3D0jDHA.2772 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Can anyone tell me why the following gives me problems.


'************************************************* *********************
' Visual Basic ActiveX Script


'************************************************* ***********************

Function Main()
dim objFSO, strFullNm
Set objFSO = CreateObject("Scripting.FileSystemObject")

strFullNm = "d:\automate\filename.txt"

If objFSO.FileExists(strFullNm) then
msgbox "The File exists"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Msgbox "No File"
Set objFSO = nothing
Main = DTSTaskExecResult_Failure ------------- THIS LINE
ERRORS,
but
if I say DTSTaskExecResult_Success it goes through.
End if


End Function











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.