G
Guest
Hello All,
I have a web application that uses multiple databases all residing on the
same SQL Server with similar info, thus 1 aspx page will reference one of 10
possible databases depending on what the user is doing. Now, I want all my
connections to the database server to reside in the same connection pool.
So, I was thinking about using a single connection string to connect to
'master' for every page, then invoke
SqlConnection.ChangeDatabase("other_database"). The question then is... by
calling ChangeDatabase to point to a different database, will that remove
that connection from the connection pool? If so, can I return it to the pool
by calling ChangeDatabase() again before disconnecting to point back to
'master'?
Thanks in advance for your help,
I have a web application that uses multiple databases all residing on the
same SQL Server with similar info, thus 1 aspx page will reference one of 10
possible databases depending on what the user is doing. Now, I want all my
connections to the database server to reside in the same connection pool.
So, I was thinking about using a single connection string to connect to
'master' for every page, then invoke
SqlConnection.ChangeDatabase("other_database"). The question then is... by
calling ChangeDatabase to point to a different database, will that remove
that connection from the connection pool? If so, can I return it to the pool
by calling ChangeDatabase() again before disconnecting to point back to
'master'?
Thanks in advance for your help,