Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lookup Problems - Help

Status
Not open for further replies.

DaveRolph

Programmer
Sep 12, 2001
26
GB
Hope someone can help me.

I started to play with ActiveX VB Scipts last week and had some good success but the lookups are really causing me problems, I am sure I am missing just one simple thing but I just can not find it.

These two posts remain un-resolved



does ANYONE have any advice or even any decent (easy reading) white papers on this.

Thanks in Advance

Dave
 
At Last

I got this method working.
What this does is enters address type records where they do not already exist in the destination table.

THE LOOKUP TAB HAS THE FOLLOWING
Code:
SELECT     Address_Type_Code
FROM         ADDRESS_TYPE
WHERE     (Address_Type_Code = ?)

THE ACTIVE X SCRIPT HAS THE FOLLOWING
Code:
'**********************************************************************
' Enter non-Duplicated
' Written 29/01/2006 - DLR - support@softopts.co.uk
'************************************************************************
Dim tExists

Function Main()
	tExists=DTSLookups("Exists").Execute(DTSSource("Address_Type_Code"))

	if (tExists = "") Then	
		DTSDestination("Address_Type_Code") = DTSSource("Address_Type_Code")
		DTSDestination("Address_Type_Desc") = DTSSource("Address_Type_Desc")
		Main = DTSTransformStat_OK
 	Else
		Main = DTSTransformStat_SkipRow
	End if
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top