I have a sql procedure saved into the object variable ("Procdetail") now with the below code I managed to get into the variable(procdetailoutput), Can someone please complete the below to also save it to the local file
public void Main() {
var table = ((DataSet)Dts.Variables["procdetail"].Value).Tables[0];
string procdetailoutput = "";
foreach (DataRow row in table.Rows)
{
procdetailoutput += row[0];
}
Dts.Variables["procdetailoutput"].Value = procdetailoutput;
Dts.TaskResult = (int)ScriptResults.Success;
}