connections using this database: 105

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
 
G

Guadala Harry

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


-GH
 
D

Darrel

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
 
S

Scott Allen

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.
 
K

Kevin Spencer

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
 
G

Guest

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


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top