Re: ActiveX Scripting in a JobStep



My bad. Perhaps in the vbscript connect to the db and issue a Raiserror.

Walter

"John Barr" <JohnBarr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:35E812F3-D3FA-401E-A521-7ED0CA67F35C@xxxxxxxxxxxxxxxx
This is not in a DTS Package, i know how to do that, this is straight from
a
jobstep with a type of ActiveX Script.

"Walter Mallon" wrote:

Here you go:

If bErr = 1 Then
Main = DTSTaskExecResult_Failure
End If

Walter


Main = DTSTaskExecResult_Failure
"John Barr" <JohnBarr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D7B25535-2D34-4757-8E3A-3E55A7E49357@xxxxxxxxxxxxxxxx
I am trying to figure out how to cause the JobStep to Error on a
condition
so
i can have it retry later. The JobStep is written in ActiveX, VBScript.
The
JobStep basically does this:


Dim oFso, oFolder, bErr

Set bErr = 0

Set oFso = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFso.GetFolder("C:\Temp")

If oFolder.Files.Count < 10 Then
bErr = 1
End If


Set oFolder = Nothing
Set oFso = Nothing

If bErr = 1 Then
'Cause JobStep to Fail
End If








.



Relevant Pages

  • Re: ActiveX Scripting in a JobStep
    ... jobstep with a type of ActiveX Script. ... The JobStep is written in ActiveX, ... Dim oFso, oFolder, bErr ... Set oFso = CreateObject ...
    (microsoft.public.sqlserver.dts)
  • Re: ActiveX Scripting in a JobStep
    ... The JobStep is written in ActiveX, ... Dim oFso, oFolder, bErr ... Set oFso = CreateObject ... Set oFolder = Nothing ...
    (microsoft.public.sqlserver.dts)