Hi,
I'm on writing a custom data flow component (transformation). For this I need access to an external datasource. As best practice, it seems that you should use a connectionmanager in the package.
But I don't really know how to access them.
I've overwritten the AquireConnections() to lookup in the RuntimeConnectionCollection for the connection managers. But It seems it doesnt get called. If I call it my own, for example in validate (just for debugging purposes) the collection is empty, although there are two connectionmanagers in the package.
What am I doing wrong or has someone a code snippet for me.
Thanks T.
To make the package connections available within the AcquireConnection or ReleaseConnection method, (make sure you use the latter to close any connection resources), you first have define the component as having one or more connections. You do this in the ProvideComponentProperties method, so just add it and give it a name, description if you feel like it.
IDTSRuntimeConnection90 runtimeConnection = ComponentMetaData.RuntimeConnectionCollection.New();
runtimeConnection.Name = "Reference Data";
This acts as a placeholder, so that if you were to now look at the built-in Advanced UI Editor, on the first page you will see the connection listed, ready for you to choose one of the existing package connections.