ASP.NET - dynamically creating database connection in datasets

Posted by Foo on Stack Overflow See other posts from Stack Overflow or by Foo
Published on 2010-05-04T18:39:30Z Indexed on 2010/05/04 18:48 UTC
Read the original article Hit count: 409

Filed under:
|
|
|
|

I am currently using datasets for my data access layer. I currently store the connection string in the web.config file. I need the ability to change the connection to another database before any queries are processed. Is there an event that is triggered or a base class that can be modified that intercepts the process of retrieving the connection string from the web.config file? Is there any way to handle multiple database connections using the same code base and also take advantage of the connection pooling? I understand the best method is to get rid of datasets and use custom data objects. Any ideas?

© Stack Overflow or respective owner

Related posts about asp

Related posts about net