all groups > sql server connect > july 2007 >
You're in the

sql server connect

group:

Sql Server connection timeout problem


Sql Server connection timeout problem ads
7/27/2007 12:02:03 AM
sql server connect: im experiencing connection timeout in SQLSERVER2000 when using my web
application. It seems the database connection pool has been reached. Im using
microsoft application block sqlhelper to connect to the database. A temporary
solution is to increase the connection timeout and/or increase the database
pool but i want to understand the root of the problem. This problem maybe due
to many sql connection not being closed in the web app or there is an error
in the sql query.

Is it true that sqlhelper.executereader doesnt close sql connection?

What about sqlhelper.executescalar ,executenonquery,executedataset?

Whenever i insert this code: SqlConnection conn = new
SqlConnection(System.Configuration.ConfigurationManager.AppSettings["connectionString"])
to pages which need to connect to database, does this add a connection to the
database pool whenever the page load is executed?

i want to keep sql connection object minimum as possible so the database
pool will not be reached.

Please point me to the right direction.

Thanks,
Ads
Re: Sql Server connection timeout problem William Vaughn
7/27/2007 9:06:17 AM
This question has been asked and answered a thousand times so there are lots
of other sources to draw upon.
I also answered it so often I wrote a whitepaper on the subject and included
it in my book. See
http://betav.com/blog/billva/2007/05/managing_and_monitoring_net_co.html

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

[quoted text, click to view]
Re: Sql Server connection timeout problem ads
7/29/2007 8:00:01 PM
Thanks alot..the article is very helpful..

[quoted text, click to view]
AddThis Social Bookmark Button