williadn48
Programmer
I am trying to import data from Access to SQL. Since I am a newbie at DTS Activex scripting, I think the syntax is not correct.
ERROR: Invalid procedure call or argument: DTSSource on line 2.
Function Main()
DTSDestination("FStartTime") = Trim(DTSSource("Date")) + " " + Trim(DTSSource("Start Time"))
DTSDestination("FEndTime") = Trim(DTSSource("Date")) + " " + Trim(DTSSource("End Time"))
DTSDestination("TransxStatus") = "Function Completed"
DTSDestination("Access_tblMain_Key") = DTSSource("Key")
DTSDestination("EntryDate") = Trim(DTSSource("Date")) + " " + Trim(DTSSource("Start Time"))
if DTSSource("Associate") = "Tarabiya, Danielle" then
DTSDestination("AssociateID") = 999999
end if
DTSDestination("QCBatchesAudited") = DTSSource("Batches Audited")
if DTSSource("Function") = "Prep" then
DTSDestination("FuncArea") = 32
If DTSSource("Sub-Function") = "Select Sub-Function" then
DTSDestination("SubFunc") = 105
end if
If DTSSource("Sub-Function") = "" then
DTSDestination("SubFunc") = 105
end if
If DTSSource("Sub-Function") = "e-file" then
DTSDestination("SubFunc") = 105
end if
If DTSSource("Sub-Function") = "Research-Mail" then
DTSDestination("SubFunc") = 106
end if
If DTSSource("Sub-Function") = "Return-Mail" then
DTSDestination("SubFunc") = 104
end if
end if
if DTSSource("Function") = "Scan" then
DTSDestination("FuncArea") = 33
If DTSSource("Sub-Function") = "Select Sub-Function" then
DTSDestination("SubFunc") = 109
end if
If DTSSource("Sub-Function") = "" then
DTSDestination("SubFunc") = 109
end if
end if
if DTSSource("Function") = "Lunch" then
DTSDestination("FuncArea") = 39
DTSDestination("SubFunc") = 122
end if
if DTSSource("Function") = "Microfilm" then
DTSDestination("FuncArea") = 39
DTSDestination("SubFunc") = 122
end if
if DTSSource("Sub-Function") = "Light" then
DTSDestination("SubFunc") = 112
end if
if DTSSource("Sub-Function") = "Heavy" then
DTSDestination("SubFunc") = 115
end if
if DTSSource("Sub-Function") = "Mod1" then
DTSDestination("SubFunc") = 113
end if
if DTSSource("Sub-Function") = "Mod 1" then
DTSDestination("SubFunc") = 113
end if
if DTSSource("Sub-Function") = "Mod2" then
DTSDestination("SubFunc") = 114
end if
if DTSSource("Sub-Function") = "VerifyDE" then
DTSDestination("SubFunc") = 116
end if
if DTSSource("Sub-Function") = "CS" then
DTSDestination("SubFunc") = 117
end if
if DTSSource("Comments") <> "Enter Comments " then
DTSDestination("Comments") = DTSSource("Comments")
end if
Main = DTSTransformStat_OK
End Function
Anyone have any clues what might be wrong?
ERROR: Invalid procedure call or argument: DTSSource on line 2.
Function Main()
DTSDestination("FStartTime") = Trim(DTSSource("Date")) + " " + Trim(DTSSource("Start Time"))
DTSDestination("FEndTime") = Trim(DTSSource("Date")) + " " + Trim(DTSSource("End Time"))
DTSDestination("TransxStatus") = "Function Completed"
DTSDestination("Access_tblMain_Key") = DTSSource("Key")
DTSDestination("EntryDate") = Trim(DTSSource("Date")) + " " + Trim(DTSSource("Start Time"))
if DTSSource("Associate") = "Tarabiya, Danielle" then
DTSDestination("AssociateID") = 999999
end if
DTSDestination("QCBatchesAudited") = DTSSource("Batches Audited")
if DTSSource("Function") = "Prep" then
DTSDestination("FuncArea") = 32
If DTSSource("Sub-Function") = "Select Sub-Function" then
DTSDestination("SubFunc") = 105
end if
If DTSSource("Sub-Function") = "" then
DTSDestination("SubFunc") = 105
end if
If DTSSource("Sub-Function") = "e-file" then
DTSDestination("SubFunc") = 105
end if
If DTSSource("Sub-Function") = "Research-Mail" then
DTSDestination("SubFunc") = 106
end if
If DTSSource("Sub-Function") = "Return-Mail" then
DTSDestination("SubFunc") = 104
end if
end if
if DTSSource("Function") = "Scan" then
DTSDestination("FuncArea") = 33
If DTSSource("Sub-Function") = "Select Sub-Function" then
DTSDestination("SubFunc") = 109
end if
If DTSSource("Sub-Function") = "" then
DTSDestination("SubFunc") = 109
end if
end if
if DTSSource("Function") = "Lunch" then
DTSDestination("FuncArea") = 39
DTSDestination("SubFunc") = 122
end if
if DTSSource("Function") = "Microfilm" then
DTSDestination("FuncArea") = 39
DTSDestination("SubFunc") = 122
end if
if DTSSource("Sub-Function") = "Light" then
DTSDestination("SubFunc") = 112
end if
if DTSSource("Sub-Function") = "Heavy" then
DTSDestination("SubFunc") = 115
end if
if DTSSource("Sub-Function") = "Mod1" then
DTSDestination("SubFunc") = 113
end if
if DTSSource("Sub-Function") = "Mod 1" then
DTSDestination("SubFunc") = 113
end if
if DTSSource("Sub-Function") = "Mod2" then
DTSDestination("SubFunc") = 114
end if
if DTSSource("Sub-Function") = "VerifyDE" then
DTSDestination("SubFunc") = 116
end if
if DTSSource("Sub-Function") = "CS" then
DTSDestination("SubFunc") = 117
end if
if DTSSource("Comments") <> "Enter Comments " then
DTSDestination("Comments") = DTSSource("Comments")
end if
Main = DTSTransformStat_OK
End Function
Anyone have any clues what might be wrong?