dave
08-20-1999, 06:46 PM
Hi, I'm having the following problem:<BR><BR>On my site I have about about 15 different ASP files which each open a connection to the same MS Access Database. After a connection is opened in a file from 1-5 queries are executed utilizing that connection. This seems to work fine generally.<BR><BR>However, about twice a day my site crashes my ISP's server because there are hundreds of connections that were opened and never closed. I've looked through all my ASP code and can't find a place where I neglect to close a connection. Is there something else I'm missing or that I should look for?<BR><BR>I'm using commands in the following format:<BR><BR><%<BR>Set MyConn = Server.CreateObject("ADODB.Connection")<BR> MyConn.Open "DSN=bug1"<BR> Set RS = MyConn.Execute(sqlQuery1)<BR> Set TS = MyConn.Execute(sqlQuery2)<BR>%><BR><BR><%<BR> WHILE NOT RS.EOF<BR>%><BR><BR><%<BR> RS.MoveNext<BR> WEND<BR> RS.Close<BR>%><BR><BR><%<BR> TS.Close<BR> MyConn.Close<BR> %>