ssis - Flat file source with EzApi -


does have examples of using ezapi flat file data source? examples in documentation start oledb connections.

specifically can't work out how define input , output columns.

say, instance, have csv file columns firstname, surname , age. want read ssis, sort age , write out text file.

according post how use ezapi flatfile source in ssis? need define columns manually, can't suggested code work.

if do:

if (!pkg.source.outputcolumnexists("col0")) {         pkg.source.insertoutputcolumn("col0");  }  bool newcolumnexists = pkg.source.outputcolumnexists("col0"); 

newcolumnexists still false.

i think link : http://blogs.msdn.com/b/mattm/archive/2008/12/30/ezapi-alternative-package-creation-api.aspx

you know how create one.

if want add columns in flat file use code:

 var flatfilecm = new ezflatfilecm(this);  flatfilecm.connectionstring = file;    foreach (var column in columns)    {     // add new column flat file connection manager     var flatfilecolumn = flatfilecm.columns.add();      flatfilecolumn.datatype = datatype.dt_wstr;     flatfilecolumn.columnwidth = 255;      flatfilecolumn.columndelimiter = columns.getupperbound(0) == array.indexof(columns, column) ? "\r\n" : "\t";      flatfilecolumn.columntype = "delimited";      // use import file field name name column     var columnname = flatfilecolumn idtsname100;     if (columnname != null) columnname.name = column;  }  flatfilecm.columnnamesinfirstdatarow = true;  

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -