![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Having problems with multiple columns in ActiveX script. I've tried everything I've found on Microsoft website, numerous newsgroups and websites. I'm just wanting to do a data transformation and I'm new to DTS but this will save me hours and hours of work. The lookup as follows:- SELECT addr_detail.addr_line1, addr_detail.addr_line2, addr_detail.addr_line3, addr_detail.addr_city FROM addr_detail INNER JOIN address_type_ref ON addr_detail.addr_company_code = address_type_ref.atr_company_code AND addr_detail.addr_customer_code = address_type_ref.atr_customer_code AND addr_detail.addr_number = address_type_ref.atr_addr_number WHERE (address_type_ref.atr_company_code = 1) AND (address_type_ref.atr_addr_type = 'I') AND (address_type_ref.atr_customer_code = ?) The script in it's entirety is :- '************************************************* ********************* ' Visual Basic Transformation Script '************************************************* *********************** ' Copy each source column to the destination column Function Main() arr = DTSLookups("Address_Lines").Execute(DTSSource("cus _code")) DTSDestination("OKCUA1") = arr(0) DTSDestination("OKCUA2") = arr(1) DTSDestination("OKCUA3") = arr(2) DTSDestination("OKCUA4") = arr(3) Main = DTSTransformStat_OK End Function I always get the message Type mismatch 'arr' with an error code 0 pointing to the line where I set "OKCUA1". I've tried putting in dim arr(4) but then it doesn't like the DTSLookups line. I've tried .Value when setting the Destination values and even CStr for the elements. Any help would be greatly appreciated. Regards Stuart Wallace |
![]() |
| Thread Tools | |
| Display Modes | |
| |