title: Establishing the connection from Script Task(VB) to OLEDB Connection Manager of SSIS Package
body: <p>How to use the existing OLEDB connection Manager from scripttask Task(VB). i need to execute a SQL statement from "Script Task" Task.</p>
  
  <h2>Edit</h2>
  
  <p>Attempted the following code but couldn't get the connection with my OLEDB Connectionmanager</p>
  
  <pre><code>Dim MyCM As ConnectionManager = Dts.Connections("MyConnection1") 
  Dim CS As String = Dts.Connections(MyCM).ConnectionString 
  sqlConn = New SqlConnection(CS) 
  </code></pre>