I'm trying to read Connection Manager properties, but am stumbling when trying to access anything beyond the generic ConnectionManager objects. In it's stripped down format the code i'm using to read a Property is this:
string InputProperty = string.Empty;
PropertyInfo PropInfo = null; // Uses System.Reflection to get property info
foreach (ConnectionManager v in package.Connections)
PropInfo = typeof(ConnectionManager).GetProperty(InputProperty);
However if i'm trying to read an input property that's specific to a type of connection manager, e.g. Flat File Connection manager property HeaderRowsToSkip, the above code fails as the ConnectionManager object only serves up a few generic properties.
Now, I assume that I need to cast or similar to get the IDTSConnectionManagerFlatFile Connection type... but at this point I get lost. Can anybody give me a helpful pointer?
James Beresford @ www.bimonkey.com
SSIS / MSBI Consultant in Sydney, Aust
View Complete Post