Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Script component fails after installing integration services

$
0
0
I put together a pretty simple script.  It adds a row number column to a flat file.  Very simple, very straight forward.

   [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
    public class ScriptMain : UserComponent
    {
        private int m_rownumber;
        public override void PreExecute()
        {
            base.PreExecute();
            m_rownumber = 0;
        }
        public override void PostExecute()
        {
            base.PostExecute();

        }
        public override void Input0_ProcessInputRow(Input0Buffer Row)
        {
            m_rownumber++;
            Row.rownumber = m_rownumber;
        }

    }



This ran fine in SSDT, however it bombed in SQL agent because IS was not installed.  I installed IS and now the script fails due to 'Object reference not set to an instance of an object'. If I uninstall IS, this works again.

This is all SQL Server 2012.  Any ideas?

Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>