Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Step with Status "Not Run"

Status
Not open for further replies.

datenis

Programmer
Jan 22, 2002
98
CA
I'm using an activeX script to do some conditional logic, if there are records in the Delta_INV_INFO table it exits with DTSTaskExecResult_Success. The problem is that I get the msg box for number for records read but the next task on the success path doesn't get executed:

Code:
'**********************************************************************
'  Visual Basic ActiveX Script
'************************************************************************
Function Main()
dim myConn
dim myRecordset
dim iRowCount

' instantiate the ADO objects
set myConn = CreateObject("ADODB.Connection")
set myRecordset = CreateObject("ADODB.Recordset")

' set the connection properties to point to the Northwind database,
' using the Customers table
     myConn.Open = "Provider = MSDASQL.1;Persist Security Info=True;Data Source=Pubs;"
    mySQLCmdText = "Select 'rowcount' = Count(*) from DELTA_INV_INFO"

myRecordset.Open mySQLCmdText, myConn

set Flds = myRecordset.Fields
set iRowCount = Flds("rowcount")

If iRowCount.Value = 0 then
   msgbox "No Records Read"
   Main = DTSTaskExecResult_Failure
Else
   MsgBox "The number of records is: " & iRowCount.Value
   Main = DTSTaskExecResult_Success
End If
End Function

Can you tell me why it doesn't work and what is the solution?

Thanks,

-d
 
To elaborate on what I'm trying to do, There are transformation tasks to be done on after each Success and Failure, lets call them task A and task B.

So it looks like this:
ActiveX Script.Success --> task A
ActiveX Script.Failure --> task B --> task A

So on the designer I linked the tasks togheter as suggested, but task A never gets executed on Succes or Failure.

After some fiddling with the on success workflow connections, I was able to get the task A going if I cut the workflow from task B to Task A on the designer, but now task A doesn't get executed if the Active X script fails, unless I create another instance of Task A on the designer.

What I really want to do is for task A to execute on both Active X Success and Failure, just that the failure status will lead to one extra step before executing task A, on the same instance of Task A.

Thanks

-d
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top