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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Invalid Task Result value????

Author  Topic 

Gopher
Yak Posting Veteran

83 Posts

Posted - 2007-06-06 : 04:05:03
Hi All

I am trying to work out a date value and every time I run this code I get a 'Invalid Task Result value' and I have no idea why!!!

Any ideas?


My Code:

Function Main()
Dim d
d = DatePart("D",Now())
If d <> 1 then
Main = DTSTaskExecResult_Faliure
Else
Main = DTSTaskExecResult_Failure
End If
End Function


Cheers

Gopher

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2007-06-06 : 04:10:45
It's not causing your the problems, but I'm assuming the Else statment should be DTSTaskExecResult_Success, otherwise, there's not a lot of point in testing the day...

Mark
Go to Top of Page

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2007-06-06 : 04:12:12
Also, just spotted the typo in the first task result
quote:
Faliure
That'd do it!

Mark
Go to Top of Page

Gopher
Yak Posting Veteran

83 Posts

Posted - 2007-06-06 : 04:16:30
Yes I am a Spanner!!!

After fixing the spelling mistake - i am getting the following message now:

'Task Reported Failure on Execution'
Go to Top of Page

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2007-06-06 : 04:50:24
Which is what you're expecting, right?

Mark
Go to Top of Page
   

- Advertisement -