sql-serverssisetlscript-component

How do I embed the Connection Manager inside the C# code of the SSIS Script Component?


When I open a Script component, I can choose a Connection Manager from a dropdown list:

enter image description here

This Connection Manager has it all, if I had it as an object in the C# code, I would not need to write a hardcoded connection string anymore.

I tried it with an OLEDB provider and SQL but failed.

Question(s)


Solution

  • This is well documented on MSDN, covering both VB and C# type of scripts: http://msdn.microsoft.com/en-us/library/ms136018.aspx