vendredi 30 janvier 2015

how to read filenames from anouther file in ssis


Vote count:

0




how to read file names from another file in ssis using script task


I tried the bellow code but i am getting single file my requirement is to read one file at a time and load data into table.



public void Main()
{
String filename = Dts.Variables["filename"].Value.ToString();
using (System.IO.StreamReader rdr = new System.IO.StreamReader(filename))
{
Dts.Variables["User::filename"].Value = rdr.ReadLine();


}

Dts.TaskResult = (int)ScriptResults.Success;
}


class for setting the

enum ScriptResults
{
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
};

}
}


asked 36 secs ago







how to read filenames from anouther file in ssis

Aucun commentaire:

Enregistrer un commentaire