I am having an issue with my SSIS Script Component. It seems that my Reader is getting closed before my CreateNewOutputRows method gets a hold of it. Would anyone be able to help me out?
OdbcConnection odbcConn;
OdbcCommand odbcCmd;
OdbcDataReader odbcReader;
public override void PreExecute()
{
base.PreExecute();
using (odbcConn = new OdbcConnection(this.Connections.InformixODBC.ConnectionString))
{
odbcConn.Open();
string cmdText = Variables.INFORMIXQUERY;
cmdText = cmdText.Replace("{{START_DATETIME}}", "'" + Variables.STARTDATETIME + "'");
cmdText = cmdText.Replace("{{END_DATETIME}}", "'" + Variables.ENDDATETIME + "'");
odbcCmd = new OdbcCommand(cmdText, odbcConn);
odbcReader = odbcCmd.ExecuteReader();
}
}
This is how I have the reader currently set up. I stepped through and it seems to exit out of the PreExecute method and go into the CreateNewOutputRows method, but I cant do any of my AddRow calls because the reader is closed.
Any help would be much appreciated. Thanks!