I have a c# generated dataset. How can I change the connection string so I can use the dataset with another (identically structured yet differently populated) database? Th
The database name is also a parameter in the connection string.
Based on the link above, I did it this way:
partial class QueriesTableAdapter
{
public QueriesTableAdapter(string connectionString)
{
Properties.Settings.Default["connectionString"] = connectionString;
}
}
You can modify a single instance of the table adapter.
_myAdapter.Connection.ConnectionString = connectionString;