Hi,
Opening and closing connections is expensive - OLEDB will pool connections
by default to mitigate this.
When you close the connection it gets returned to a connection pool. When
you open another connection it gets taken from the pool, assuming that
you're using an identical connection string. This is much faster than
actually opening a port, communicating with SQL Server and setting up a
brand new connection. On the other hand, if you don't open a connection for
a while then idle connections from the pool will actually get destroyed. At
this point they will disappear from SQL Server.
HTH
Ian
"Bruce Sandell" <br***@conferserv.com> wrote in message
news:11*****************************@phx.gbl...
I have a c# application where I run a query every 10
seconds.
After the query completes, I close the connection object,
close the oledbdatareader object and dispose of the
command object.
When I look at my current activity in the database,
sleeping processes keep accumulating for each of these
queries. Why don't they go away? Should I care? Are
they using up any resources?
This application runs on MSDE (latest version).
Thanks for any help.
Bruce