I'm trying to produce a column 'start/length' spec document from a SSIS package that exports a DB table to a flat file. I have hit something of a brick wall in getting the Columns
property from the ConnectionManager object that handles the flat file connection. I am able to get the Columns
property, but I cannot do anything with it, as I cannot determine any type to cast it to. If I cast it to DTSProperty, I get very few useful properties on the object. If I get the property as object
, all I can determine is that it is a System.__ComObject
.
How do I retrieve the Columns property as a useful object, hopefully a collection, that I can iterate over?
Sample code:
DTSRT.Application dtap = new Application();
DTSRT.Package pkg = dtap.LoadFromDtsServer(@"\MSDB\ExportSamples", "ERISIA", null);
DTSRT.ConnectionManager ffcn = pkg.Connections["DestinationConnectionFlatFile"];
DtsProperty cols = ffcn.Properties["Columns"];