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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script in DTS gets correct value in test but not when package executed

Status
Not open for further replies.

dltrue

IS-IT--Management
Aug 1, 2007
1
0
0
US
I have an ActiveX Script for a transformation in a DTS that uses lookups and global variables to get a sum total of the Employee Deferral field and then send it to a DTSDestination. When I click on the TEST button, it displays the correct totals. However, when I execute the package, the destination file contains a null in this field instead of the correct values. I don't receive any error on this. Here's the code for the script:

'**********************************************************************
' Visual Basic Transformation Script
'************************************************************************

' Copy each source column to the destination column
Function Main()
Company=DTSSource("COMPANY")
Employee=DTSSource("EMPLOYEE")
DeferralCode=DTSGlobalVariables("DeferralCode").Value
DeferralCodeCatchup=DTSGlobalVariables("DeferralCodeCatchup").Value
MatchCode=DTSGlobalVariables("MatchCode").Value
RunDateBegin=DTSGlobalVariables("RunDateBegin").Value
RunDateEnd=DTSGlobalVariables("RunDateEnd").Value

EEDeferral = DTSLookups("GetContrib").Execute(Company,Employee,DeferralCode,DeferralCodeCatchup,RunDateBegin,RunDateEnd)
DTSDestination("EEDeferral") = EEDeferral

ERMatch=DTSLookups("GetMatchContrib").Execute(Company,Employee,MatchCode,RunDateBegin,RunDateEnd)
DTSDestination("ERMatch")= ERMatch

LoanPayment=DTSLookups("GetLoanPmt").Execute(Company,Employee,RunDateBegin,RunDateEnd)
DTSDestination("LoanPayment") = LoanPayment


Main = DTSTransformStat_OK
End Function



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top