In the Data Flow Task, I need re-direct each row to exe and get the output for each row, similar to script component.
I tried to use Process in Script Component, but it is throwing exception "StandardOut has not been redirected or the process hasn't started yet.". The code used in Script Component is:
Process myApp = new Process();
myApp.StartInfo.FileName = @"Someexe.exe";
myApp.StartInfo.Arguments = "param1";
myApp.StartInfo.UseShellExecute = false;
myApp.StartInfo.RedirectStandardOutput = false;
myApp.Start();
while (!myApp.HasExited)
{
string result= myApp.StandardOutput.ReadToEnd();
}
Any suggestions? I would like to know if there is any better way to do this?