I'm trying to write the code to connect to a connection manager in SSIS SQL server 2012 - I'm using the examples but the references for Dts don't appear to be working. I've the following namespaces imported:-
#region Namespaces using System; using System.Data; using System.Data.SqlClient; using Microsoft.SqlServer.Dts.Pipeline.Wrapper; using Microsoft.SqlServer.Dts.Runtime.Wrapper; using Microsoft.SqlServer.Dts.Runtime;
The code I'm trying to execute is :-
object rawConnection = Connections.SCCDWDEV.AcquireConnection(null ); SqlConnection _connSCCDWDEV = (SqlConnection)rawConnection; SqlCommand _sqlcmd = new SqlCommand(); _sqlcmd.Connection = _connSCCDWDEV; _sqlcmd.CommandType = CommandType.Text; _sqlcmd.CommandText = "Select URN, Establishment_Name, LA_CODE, Establishment_Number, Closed_Date, schoolDetailsCode FROM dimSchoolDetails where LA_CODE = " + Row.CopyofLACODE.ToString() + " and Establishment_Number = " + Row.CopyofEstab.ToString(); SqlDataReader _reader = _sqlcmd.ExecuteReader();
Any help greatly appreciated. All of the BOL page I find talk about using the dts.xxxxxx but as I say I can't get this to resolve and I can't find any references to include in my project that resolve the issue either. Totally confused!
Thanks,
Tim