ConfigurationSourceBuilder doesn't update default config

Topics: Data Access Application Block, Enterprise Library Core
Jul 17, 2013 at 3:10 PM
Edited Jul 18, 2013 at 2:34 PM

Following code is executed successfully but defaultDB's connection string doesn't change.
Public Sub New(strUserName As String, strPassword As String, strServer As String, strSchema As String)
        UserName = strUserName
        Password = strPassword
        Server = strServer
        Schema = strSchema
        Dim builder = New ConfigurationSourceBuilder()
        builder.ConfigureData() _
            .ForDatabaseNamed("************") _
              .AsDefault() _
              .ThatIs.ASqlDatabase() _
              .WithConnectionString(ConnString) 'Return connection string based on parameters

        Dim configSource = New DictionaryConfigurationSource()
        EnterpriseLibraryContainer.Current = EnterpriseLibraryContainer.CreateDefaultContainer(configSource)
    End Sub
I am trying to programatically change the database App is using. What is it I am missing?