we enabled our clients to change databases, in the back-end the code obviously changes the connection string in the app.config but somehow, somewhere the app loaded one specific connection string into memory and only when we restart the app the new connection string is applied.
<add name="DMRQueries" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string="data source=xxx.xxx.xxx.xxx,xxxx;initial catalog=OHS-DemoDataset;persist security info=True;user id=sa;password=xxxxxxxx;MultipleActiveResultSets=True;App=EntityFramework""
providerName="System.Data.EntityClient" />
I know it is this auto-generated connection string. (this connection string was generated by RDLC dataset if I'm not mistaken)
I don't know how to refresh it in memory without restarting the app.
Even though we change the connection string while the app is running it still pulls data from the old source
Please help I'm pulling my hair out
Thank you.