This short blog showing you one of the possibilities to resolve the error message “Connection property has not been initialized” when using the Script Component in SSIS package.
In SSIS package, the Script Component is added, and the Connection Manager is added like below.
In the Script Component C# code you have the following.
public override void AcquireConnections(object Transaction)
ConMgr = this.Connections.ConnectionQc;
Targetconnection = this.Connections.ConnectionQc.AcquireConnection(null);
SqlConn = Targetconnection as SqlConnection;
When you run then you get the error “Connection property has not been initialized”.
What is wrong here is that your Package Connection Manager could be using
Native OLDE DB\SQL Server Native Client 11.0
Change the Connection Manager Provider to
.Net Providers\SqlClient Data Provider
This will resolve your problem if you are having the same scenario as I do.