ActiveX Transformation

Last Post 18 Sep 2006 07:12 AM by Lee. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Shill_SQL
New Member
New Member

--
10 Aug 2006 02:08 AM
I am trying to export some order data out to a txt file. The structure of the file required is roughly:-
Site and order information e.g branch, address fields etc and purchase order number. There are numerous field forming a header
Order details - comprising the detail of the order

I have created a SQL query for the basis of the transformation and have added the following code into the transformation to produce the required result

vPONumber = DTSGlobalVariables("PONumber")

if vPONumber ="" or vPONumber <> DTSSource("PONumber") Then
' New Order
DTSGlobalVariables("PONumber")=DTSSource("PONumber")
TransformString = DTSSource("CLO")+DTSSource("BranchID")+DTSSource("Company")+DTSSource("Address_1")+DTSSource("Address_2")+DTSSource("Address_3")+DTSSource("Address_4")+DTSSource("PostCode")+DTSSource("DateColumn")+DTSSource("PONumber")+DTSSource("RequiredDate")+VBCRLF + DTSSource("type2")+DTSSource("SUPP_REF")+DTSSource("PROD_CODE")+DTSSource("PACK_SIZE")+DTSSource("DESCRIPT")+DTSSource("OrderQty")+DTSSource("Cost_PRICE")
DTSDestination("Col001") = TransformString
Main = DTSTransformStat_OK

else
'current order
TransformString = DTSSource("type2")+DTSSource("SUPP_REF")+DTSSource("PROD_CODE")+DTSSource("PACK_SIZE")+DTSSource("DESCRIPT")+DTSSource("OrderQty")+DTSSource("Cost_PRICE")
DTSDestination("Col001") = TransformString
Main = DTSTransformStat_OK
end if

On testing the script fails at the point specifying DTSDestination("Col001") = TransformString with "Invalid procedure call or argument DTSDestination, where am I going wrong?
Lee
New Member
New Member

--
18 Sep 2006 07:12 AM

Create a temp variable for DTSGlobalVariables("PONumber"). DTSGlobalVariables("PONumber")=DTSGlobalVariables("PONumber") will
not work in dts. You are trying to do too many shortcuts, and active-x isn't rich enough to do this.


Acceptable Use Policy
---