Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Server 6.5 Connections to database not being killed until timing out

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-26 : 11:05:54
Ken Tran writes "Im using ADO in ASP to make connections to a SQL Server 6.5 Server.
The problem is that the connection to the DB is remaining in the system activity window and is not being removed until 50-60 seconds.
This causes the maximim connections (15) to be reached and sql server errors occuring as result.
I expected the connections to be removed immediately.

I explicity create my ADO objects and close and set to nothing as appropriate

This is the type of code (not exact):

dim aCmd
dim aCon
dim aRs

set aCon = strCon

aCmd.ActiveConnection = aCon
aCmd.CommandType = adCmdText
aCmd.CommandText = "select ..."

set aRs = aCmd.Open

set aCmd.ActiveConnection = nothing
set aRs = nothing"

MuffinMan
Posting Yak Master

107 Posts

Posted - 2002-04-26 : 11:40:37
It appears that ADO is attempting to do connection pooling (that's why the connections stay active for 60 seconds) but your code may not be implementing it correctly.

1) What does your connection string look like (strCon)?
2) Are you using a SQL login or NT authentication?
3) How many concurrent users are accessing the system?

In order for connection pooling to work, the connection string MUST be identical for each call to the database.


Edited by - MuffinMan on 04/26/2002 11:41:15
Go to Top of Page
   

- Advertisement -