In the daily application of databases, we often need to open 2 or more databases for reading related data.
To open the database User1DB and User2DB, then you can define the database connection:
'Open the database userdb_a
Connstr1 = provider = microsoft.jet.OLEDB.4.0; data source = & server.mappath (userdb_a.mdb)
Set conna = server.createObject (adodb.connection)
conna.open connstr1
'Open the database userdb_b
Connstr2 = provider = microsoft.jet.OLEDB.4.0; data source = & server.mappath (userdb_b.mdb)
Set conn2 = server.createObject (adodb.connection)
conb.open connstr2
Then you need to call which database, and call different Conna or Connb. This is the key. Do not teach the database operation below. In some small projects, it can be used like this, but in an environment with a large requirements for site load, how to operate two databases at the same time, this site feels that the use of this method is still to be discussed.