all groups > sql server dts > june 2007 >
You're in the

sql server dts

group:

SetComponentProperty("Name"...


SetComponentProperty("Name"... Sebastian Ciesielski
6/18/2007 12:00:00 AM
sql server dts: Hello,

I try to prepare SSIS package with application written in C#,
but I noticed problem with following code:

CManagedComponentWrapper instance1 = source.Instantiate();

instance1.ProvideComponentProperties();

source.RuntimeConnectionCollection[0].ConnectionManagerID =
pakiet.Connections["DB2"].ID;

zrodlo.RuntimeConnectionCollection[0].ConnectionManager =
DtsConvert.ToConnectionManager90(pakiet.Connections["DB2"]);

instance1.SetComponentProperty("OpenRowset", String.Format("{0}.{1}",
table_schema, table_name));

instance1.SetComponentProperty("AccessMode", 0);

instance1.SetComponentProperty("Name", (table_schema + "_" + table_name));

^ I can't set property "Name", application crashes with 0xC0204006
DTS_E_FAILEDTOSETPROPERTY message



Setting property "Name" is neccessary, because I have to place many

DTSAdapter.OLEDBSource components in Data Flow



S.



Re: SetComponentProperty("Name"... Sebastian Ciesielski
6/20/2007 12:00:00 AM
problem is resolved,

there is importans to set source
CManagedComponentWrapper property "Name" after Instantiate and
instance.ProvideComponentProperties()





S.





AddThis Social Bookmark Button