Closing out database connections. Timeouts

  • Thread starter Thread starter Do
  • Start date Start date
D

Do

Hi,

Is it better to

objConn = Nothing
or
objConn.Close.

I'm starting to get an error message that

Timeout expired. The timeout period elapsed prior to obtaining a connection
from the pool. This may have occurred because all pooled connections were in
use and max pool size was reached.
What am I doing wrong?

Thanks,

Do
 
Do said:
Hi,

Is it better to

objConn = Nothing
or
objConn.Close.

objConn.Close(). Database connections do not close themseleves upon
going out scope.
What am I doing wrong?

There are other issues to consider such as network latency and server
load. But start by closing all your connections as soon as you're done
with them and take it from there.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
 
Hi,
Timeout Problem arises if you have any query which
consumes more resources and more time in execution. Just
cross check with the Query which you are using in SQL
QUERY Analyzer.

For the Command Object there is a property called TimeOut
which u can set an integer value for query execution time
period.

Thanks
srinivas moorthy
 
Back
Top