I have an ActiveX script setup to perfrom certain tasks at the 'Pre Source Data' phase of the Data Pump Task.
I am attempting to fire the function "TransFailureMain" under a certain condition. The trouble is that it fires whether or not that condition is met.
The ActiveX Script code is:
As you can see, it is setup to fail if the Client_Id is a certain value. Currently, TransFailureMain() fires whether or not the condition is met.
Thanks
I am attempting to fire the function "TransFailureMain" under a certain condition. The trouble is that it fires whether or not that condition is met.
The ActiveX Script code is:
Code:
'**********************************************************************
' Visual Basic Transformation Script
'************************************************************************
' Copy each source column to the destination column
Function Main()
If DTSSource("Individual_Client_Id").value = 10001 then
msgbox "What error"
Main = DTSTransformStat_Error
else
Main = DTSTransformStat_OK
End If
End Function
Function PreSourceMain()
Dim sConn
Dim sSQL
Dim sPath
set sConn = CreateObject("ADODB.Connection")
sConn.Provider = "Microsoft.Jet.OLEDB.4.0"
sPath = "\\wallsend1 \careimrrpts\KPI_Access_Database\Parameter_Passing_Test.mdb"
sConn.Open = sPath
sSQL = "DELETE FROM Hahs_IMRU_GV_Out"
sConn.Execute sSQL
PreSourceMain = DTSTransformStat_OK
End Function
Function PostSourceMain()
PostSourceMain = DTSTransformstat_OK
End Function
Function TransFailureMain()
msgbox "Error in Transmain"
TransFailureMain = DTSTransformstat_OK
End Function
Function InsertSuccessMain()
InsertSuccessMain = DTSTransformstat_OK
End Function
Function InsertFailureMain()
InsertFailureMain = DTSTransformstat_OK
End Function
Function BatchCompleteMain()
BatchCompleteMain = DTSTransformstat_OK
End Function
Function PumpCompleteMain()
PumpCompleteMain = DTSTransformstat_OK
End Function
As you can see, it is setup to fail if the Client_Id is a certain value. Currently, TransFailureMain() fires whether or not the condition is met.
Thanks