dbTalk Databases Forums  

Error using DTSLookups Collection

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


Discuss Error using DTSLookups Collection in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bruce Hanson II
 
Posts: n/a

Default Error using DTSLookups Collection - 10-11-2003 , 03:21 PM






I have the following transformation defined for a source
and destination column:

Function Main()
IF DTSSource("EMP'MARITAL") = "M" THEN
DTSDestination("empTaxCategory") =
DTSLookups("TaxCategoryLookup").Execute("Married-Filing
Jointly")
ELSE
DTSDestination("empTaxCategory") =
DTSLookups.Item("TaxCategoryLookup").Execute("Sing le")
END IF
Main = DTSTransformStat_OK
End Function


When I test the transform, I get an error message that
says: Error Description, Object Required: DTSLookups

that is, there is no DTSLookups collection. Everything I
read (sqldts.com, msdn, msKB) says the syntax is as above.

SQL 7.00.623 on NT 4, sp 6

Need a solution, need to know what I am missing.
Thanks
Bruce

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Error using DTSLookups Collection - 10-13-2003 , 01:03 PM






In article <012201c39035$46557d20$a401280a (AT) phx (DOT) gbl>, Bruce Hanson II
<bhanson2 (AT) metronet (DOT) com> writes
Quote:
I have the following transformation defined for a source
and destination column:

Function Main()
IF DTSSource("EMP'MARITAL") = "M" THEN
DTSDestination("empTaxCategory") =
DTSLookups("TaxCategoryLookup").Execute("Married-Filing
Jointly")
ELSE
DTSDestination("empTaxCategory") =
DTSLookups.Item("TaxCategoryLookup").Execute("Sing le")
END IF
Main = DTSTransformStat_OK
End Function


When I test the transform, I get an error message that
says: Error Description, Object Required: DTSLookups

that is, there is no DTSLookups collection. Everything I
read (sqldts.com, msdn, msKB) says the syntax is as above.

SQL 7.00.623 on NT 4, sp 6

Need a solution, need to know what I am missing.
Thanks
Bruce
You actually have two different syntax calls, DTSLookups.Item and
DTSLookups. Both should work, but I have never used the Item method
myself.

Are your sure the lookup name is correct, TaxCategoryLookup?

Which lines does it error on?



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.