Database Reference
In-Depth Information
Figure 3-8 . Declaring connection managers in the Script component
Once they are referenced here, the syntax to use the connection within your code is
much simpler as well. Rather than using the connection name as an indexer, you can
access any of these connections through the UserComponent.Connections col-
lection. Here's an example:
Listing 3-3 . Using a Previously Declared Connection Manager in Script Component
// Connect to the ADO database connection
System.Data.SqlClient.SqlConnection conn
= (System.Data.SqlClient.SqlConnection)Connections.OLEDBPROD.AcquireConnection(null);
Variables
In many—if not most—instances of the Script task and Script component, you'll need
to inspect or manipulate values stored in SSIS variables. Because they are so prevalent
 
Search WWH ::




Custom Search