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.
Author |
Topic |
Gopher
Yak Posting Veteran
83 Posts |
Posted - 2007-06-06 : 04:05:03
|
Hi AllI 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 IfEnd FunctionCheersGopher |
|
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 |
|
|
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 |
|
|
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' |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2007-06-06 : 04:50:24
|
Which is what you're expecting, right?Mark |
|
|
|
|
|