Question on how to use two identical databases.
-
-
I want to use 2 identical databases(with different data). I use a database component. I want to know how I can change the connection's path (change form 1 database to the other) so that I don't need to change all the adapters' connections.:eek:
DB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DBPath + ";Mode=ReadWrite|Share Deny None;Persist Security Info=False" DB.RecordSource = SQL_QUERY DB.Refresh
I'm using an ADO control to hook up to my DB, but I presume its quite similar with a DAO DB. Notice DBPath is a variable used to supply the path to the DB you want to switch to. -
DB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DBPath + ";Mode=ReadWrite|Share Deny None;Persist Security Info=False" DB.RecordSource = SQL_QUERY DB.Refresh
I'm using an ADO control to hook up to my DB, but I presume its quite similar with a DAO DB. Notice DBPath is a variable used to supply the path to the DB you want to switch to.