I have a VB.NET (4.5) project in VS2013. In it I have several DataGridViews populated by a SQL Server 2012 database. The DGV and connection has all been set up with the wizards, so I have BindingSources, DataSets and TableAdapters for the DGVs - no custom coding to populate the DGVs.
I need to change to a new Database (for now the DBs are identical) and can't figure out how.
I tried changing to the DB name in the project properties Settings tab. That just caused the DGVs to not be populated at run time.
I went so far as to do a text search for the old database name in the entire project and change that to the new database name, but that (not surprisingly) just broke everything (errors and the DGVs didn't get populated).
What is the correct way to change the source database when the DGVs have already been connected to a database? I'm guessing one way to do it is to remove the existing DataSets, BindingSources, TableAdapters, etc and rebuild them, but I'd like to find out if there's something less radical and time-consuming than that first.
I need to change to a new Database (for now the DBs are identical) and can't figure out how.
I tried changing to the DB name in the project properties Settings tab. That just caused the DGVs to not be populated at run time.
I went so far as to do a text search for the old database name in the entire project and change that to the new database name, but that (not surprisingly) just broke everything (errors and the DGVs didn't get populated).
What is the correct way to change the source database when the DGVs have already been connected to a database? I'm guessing one way to do it is to remove the existing DataSets, BindingSources, TableAdapters, etc and rebuild them, but I'd like to find out if there's something less radical and time-consuming than that first.