| re: ADODB.recordset with 2 databases
TimSki
Very late reply here but I came here from another thread and saw the ?? at the end of you post and thought I would try and answer it.
Yes, indeed you could create a second connection as you have detailed.
But, if both those databases are on the same server then you don't have to.
Indeed, why add the extra overhead on system resources by creating a second connection when you don't need to.
When you create a connection and specify the "Initial Catalog", all that really means is that you can execute queries on that database without having to specify it in your query. The database is implied by the connection.
However, you can still query other databases through that connection by specifying it in the query as DrBunchman did.
In fact, you can actually create a connection without the "Initial Catalog" specified at all. In that case you MUST always specify which database in your query.
NOTE
The above only apply if the databases exist on the same server
|