OK, I'm stumped. I've been writing vb code for quite a while now and this is extremely easy code that is failing. Someone please tell me what I am missing here.
Function Main()
dim new_cc
dim new_acct
dim period
period = mid(DTSSource("Col001"),1, 4)
if period = 2003 Or period = 2004 then
DTSDestination("Col001") = DTSSource("Col001")
DTSDestination("Col002") = DTSSource("Col002")
new_cc = DTSLookups("New_cc" ).Execute( DTSSource"Col003") )
DTSDestination("Col003") = new_cc
DTSDestination("Col004") = DTSSource("Col004")
new_acct = DTSLookups( "New_Acct_num" ).Execute( DTSSource( "Col005" ) )
DTSDestination("Col005") = new_acct
DTSDestination("Col006") = DTSSource("Col006")
DTSDestination("Col007") = DTSSource("Col007")
DTSDestination("Col008") = DTSSource("Col008")
DTSDestination("Col009") = DTSSource("Col009")
DTSDestination("Col010") = DTSSource("Col010")
Main = DTSTransformStat_OK
Else
Main = DTSTransformStat_SkipInsert
End if
End Function
This fails at line 13 with "Error description:Invalid procedure call or argument: 'DTSSource'
Function Main()
dim new_cc
dim new_acct
dim period
period = mid(DTSSource("Col001"),1, 4)
if period = 2003 Or period = 2004 then
DTSDestination("Col001") = DTSSource("Col001")
DTSDestination("Col002") = DTSSource("Col002")
new_cc = DTSLookups("New_cc" ).Execute( DTSSource"Col003") )
DTSDestination("Col003") = new_cc
DTSDestination("Col004") = DTSSource("Col004")
new_acct = DTSLookups( "New_Acct_num" ).Execute( DTSSource( "Col005" ) )
DTSDestination("Col005") = new_acct
DTSDestination("Col006") = DTSSource("Col006")
DTSDestination("Col007") = DTSSource("Col007")
DTSDestination("Col008") = DTSSource("Col008")
DTSDestination("Col009") = DTSSource("Col009")
DTSDestination("Col010") = DTSSource("Col010")
Main = DTSTransformStat_OK
Else
Main = DTSTransformStat_SkipInsert
End if
End Function
This fails at line 13 with "Error description:Invalid procedure call or argument: 'DTSSource'