connections using this database: 105

  • Thread starter Thread starter Guoqi Zheng
  • Start date Start date
G

Guoqi Zheng

It is a little strange but I got 105 connections on the database of my new
application.

It sounds that each time, one user login, the connections always remains
there for forever. I am always use microsoft application block for data
access.

Any idea where should I look for the problem???

--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com
 
Are you explicitly closing and disposing your connections? Like this...
cmd.Connection.Close();
cmd.Connection.Dispose();
cmd.Dispose();


-GH
 
Are you explicitly closing and disposing your connections? Like this...
cmd.Connection.Close();
cmd.Connection.Dispose();
cmd.Dispose();

Do you need to dispose in .net? My understanding was that 'dispose' was now
one of the automatic garbage collection things that .net can take care of
for you.

-Darrel
 
Yes, it's very important to call Dispose on many of the disposable
objects, like connections. Dispose frees the connection back into the
connection pool.
 
It isn't necessary to call Dispose() if you call Close() on the Connection.
Likewise, it isn't necessary to call Close() if you call Dispose().

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
What methods are you using to access your database?
If you're using ExecuteScalar, you ought to be ok, but if you're using
ExecuteReader you'll need to dispose your DataReader.
 

Ask a Question

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.

Ask a Question

Similar Threads

string.indexof case insensitive 3
dynamic meta tag 2
shift + ctrl charactor 2
. in regular expression 3
validate an url 4
No such host is known 2
where to look for the error 2
Html to text converter 1

Back
Top