Unless explicitly disabled, .NET itself maintains pool(s) of
connections behind the scene. Doing same thing (again) manually, may
not yield much improvement.
In case you have to implement some specific logic, you may store in
Cache or Application objects.
SQL Server provider of .NET framework itself maintains pool(s) of
connections behind the scene (unless explicitly disabled). Doing same
thing (again) manually, may not yield much improvement.
For other providers or to implement some specific logic, you may store
in Cache or Application objects.
so that you fetch connection objects out of the pool only when you need
them, and destroy them as soon as you're finished with them, thereby
returning them to the connection pool...
Do NOT do that. You'll kill your scalability.
..NET has some fairly fancy built in database connection pooling that will
efficiently manage connections for you as long as you follow this simple
rule:
Open database connections only just before you need them, and close them as
soon as you are through with them.
If this default behavior doesn't work for you, would you please let us know
your requirement in detail? Thanks.
Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.