I have this following activex script in my DTS package. When i run it, its
saying:
" The Transformation is executed with a temporary file as destination. The
destination you selected in the transformation is not affected."
The code I have is
Code:
'**********************************************************************
' Visual Basic Transformation Script
'************************************************************************
' Copy each source column to the destination column
Function Main()
If DTSDestination("OCN") <> DTSSource("OCN") then
DTSDestination("OCN") = DTSSource("OCN")
DTSDestination("OCN_Name") = DTSSource("OCN_Name")
DTSDestination("OCN_Abbrev") = DTSSource("OCN_Abbrev")
DTSDestination("OCN_State") = DTSSource("OCN_State")
DTSDestination("Category") = DTSSource("Category")
DTSDestination("Overall_OCN") = DTSSource("Overall_OCN")
DTSDestination("StartDate") = DTSSource("Startdate")
DTSDestination("EndDate") = DTSSource("Enddate")
Main = DTSTransformStat_OK
Else If DTSDestination("OCN") = DTSSource("OCN") then
If (DTSDestination("OCN_Name") <> DTSSource("OCN_Name") or DTSDestination
("OCN_Abbrev") <> DTSSource("OCN_Abbrev") or DTSDestination("OCN_State") <>
DTSSource("OCN_State") or DTSDestination("Category") <> DTSSource("Category")
or DTSDestination("Overall_OCN") <> DTSSource("Overall_OCN") or
DTSDestination("StartDate") <> DTSSource("Startdate") or DTSDestination
("EndDate") <> DTSSource("Enddate")) then
DTSDestination("enddate") = DTSSource("startdate")
DTSDestination("startdate") = DTSSource("startdate")
DTSDestination("OCN") = DTSSource("OCN")
DTSDestination("OCN_Name") = DTSSource("OCN_Name")
DTSDestination("OCN_Abbrev") = DTSSource("OCN_Abbrev")
DTSDestination("OCN_State") = DTSSource("OCN_State")
DTSDestination("Category") = DTSSource("Category")
DTSDestination("Overall_OCN") = DTSSource("Overall_OCN")
Main = DTSTransformStat_OK
End IF
Else
Main = DTSTransformStat_SkipRow
End If
End If
End Function
Can somebody tell me what have i done wrong. Why isnt my destination affected
by this script.
Appreciate your help,
Thanks a lot in advance,
Nitu
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...r-dts/200602/1