i am looping through my connections:
for (int x = 0; x < Dts.Connections.Count; x++)
{
switch (Dts.Connections[x].Name.ToString())
{
case "m":
for (int z = 0; z < Dts.Connections[x].Properties.Count; z++)
{
if ( Dts.Connections[x].Properties[n].Name = "Initial Catalog"){
Dts.Connections[x].Properties[n].SetValue(object o, object value);}
}
break;
}
}
above is as far as i have gotten, the signature of setvalue is (Object o, Object value)
According to the documentation of
SetValue(), the first parameter is the object on which you want to set the property and the second is the property value. So it should be something like this:Or with LINQ:
(The
Cast()s are necessary, because the collections are, sadly, not generic.)