SSIS Script - Can't open connection

  • Hello!

    I've faced another issue. When trying to use a script and a managed connection, I'm getting an error :

    System.NullReferenceException: Object reference not set to an instance of an object.

    Here's the code I'm using :

    public override void Input0_ProcessInputRow(Input0Buffer Row)

    {

    try

    {

    string xSQL = "";

    SqlConnection sqlConn = new SqlConnection();

    sqlConn = (SqlConnection)(Connections.cnnProLog.AcquireConnection(null) as SqlConnection);

    SqlCommand sqlComm = new SqlCommand();

    sqlConn.Open(); // < --- Code is failing here

    .

    .

    .

    Not sure what I'm missing.

    Thanks in advance

  • Nevermind, really sorry. The problem was not on the code!

  • Hi.

    Please tell me where the problem was because I have got the same issue.

    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply