I have a program that generates reports by using DataTables created by TableAdapters. Now my client has a new database, and he wants to be able to switch between the new one and the old one. I found that I can do it by changing the connection string in the app.config, but I don’t know how to do it during run time. Can you suggest me a way?
Thanks
I have a program that generates reports by using DataTables created by TableAdapters. Now
Share
Don’t. You can have multiple connection strings in the
app.configand access each when needed.Configuration:
In code: