DB Conneciton Not Being Released!
Ok,
This is what I'm doing:
If m_Connection.State = ConnectionState.Open Then
m_Connection.Close()
m_Connection.Dispose()
End If
When this runs, it does not release the connection on sql server. What I do is open a connection do what I need to do and then close it. I just checked and I have like 15 connections open. Why doesn't this work, or what am I doing wrong?
jb
[466 byte] By [
jcb1269] at [2007-11-11 9:58:50]

# 1 Re: DB Conneciton Not Being Released!
Have you stepped through the code? Does this line:
If m_Connection.State = ConnectionState.Open Then
return True?
Are you using connection pooling? It may be that "closed" connections aren't closed immediately, but are simply returned to the pool to become available to the next client.
# 2 Re: DB Conneciton Not Being Released!
I was using the same code that uses the connection and it just kept opening it. I put a close at the end of the code and its all better now.
Thanks.
jb