Groups | Blog | Home
all groups > sql server dts > april 2004 >

sql server dts : Failing VB Commands For DTS


Johnmichael Monteith
4/27/2004 11:36:32 AM
I am using a DTS import, and trying to get the sucker to determine which is
the later date and use that for importing. I know I successfully did this
before, but now can not re-create it.

The error I get is:
"Error Description: Invalid procedure call or argument: 'DTSSource' Error
on Line 6"

It parses just fine, but DTS doesn't like it.

The code I am using is:

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

' Copy each source column to the detination column
Function Main()
If DtsSource("EffDate1") <= DTSSource ("EffDate2") Then DTSDetination
("EffDate") = DTSSource("EffDate2") End If
If DtsSource("EffDate1") > DTSSource ("EffDate2") Then DTSDetination
("EffDate") = DTSSource("EffDate1") End If

Main = DTSTransformStat_OK
End Function

Thank you so much for your thoughts!

Johnmichael Monteith
4/27/2004 12:15:02 PM
Figured it out. It was missing one of the DTS source items in the source
list.

Sorry to bother.

Thank you to those that already replied.


[quoted text, click to view]

Allan Mitchell
4/27/2004 8:02:21 PM
DTSDetination should read DTSDestination

Is that it?

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


[quoted text, click to view]

AddThis Social Bookmark Button