dbTalk Databases Forums  

Failing VB Commands For DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Failing VB Commands For DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Johnmichael Monteith
 
Posts: n/a

Default Failing VB Commands For DTS - 04-27-2004 , 01:36 PM






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!



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Failing VB Commands For DTS - 04-27-2004 , 02:02 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


"Johnmichael Monteith" <jpmonteith (AT) psfinc (DOT) com> wrote

Quote:
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!





Reply With Quote
  #3  
Old   
Johnmichael Monteith
 
Posts: n/a

Default Re: Failing VB Commands For DTS - 04-27-2004 , 02:15 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.


"Johnmichael Monteith" <jpmonteith (AT) psfinc (DOT) com> wrote

Quote:
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!





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.