You have to use the ConnectionManagerID on the RuntimeConnectionCollection.
private void comboConnections_SelectedIndexChanged(object sender, EventArgs e)
{
var val = comboConnections.SelectedItem;
this.metaData.RuntimeConnectionCollection[0].ConnectionManagerID = ((ConnectionManager)val).ID;
}
After using the ConnectionManagerID property everything works fine.