Hi,
in my package there are several Connection Managers linking DB2 databases
and there is one "fake" CM which copies the connection string of one of the other "real" CM depending of the need.
Then I've made a Data Flow containing an OLE DB Source and a Destination Adapter.
The Destination has a "table name from variable" access through a fixed Connection Manager,
and the Source has "sql command from variable" access and uses the "fake" Connection Manager, which has "inherited" the connection string from one of the "real" CMs.
The point is:
When I drag the arrow from the OLE DB Source to the Destination, some mapping metadata are set, and then when I execute the package, it always expects to find some given columns in the source mapped to other given columns in the destination when I'd want It to map the columns by itself, depending on the sql command (which is contained in a variable).
on the source.
(the mapping should success because source and dest always have the same names for columns)
Does anyone know how to solve this problem Thanx.

Souce and Dest auto-mapping
Frango
Thanx
Kerry Wano
What I'm trying to figure out is how it works .... 'cause I don't want a data flow for each table in my database.
Orf Quarenghi
hi mich,
did u figure out the logic behind this
Pls post the out come if u have figured out.....
Thanx in advance..
Dev
craigg75
If so, I'm afraid this can't be done. The mapping metadata of a data-flow cannot be changed at runtime.
You say: "the mapping should success because source and dest always have the same names for columns"
This is not true because although the source and destination can change, the mapping metadata cannot.
You need to build a data-flow for each table that you will be loading. Use precedence constraints in your control-flow to determine which data-flow to execute depending on which table you want to load.
Hope this helps.
-Jamie