Hi
I have now rewritten and testet this small asp-mysql debug script to check if it is asp
that doesn't close the mysql connections, and it seams that asp does the closing job
correct, but the connections are still sleeping in mysqladmin.
The test query is very small.
<%
Const adStateClosed = &H00000000
Const AdStateOpen = &H00000001
Dim conn, rs
set conn = server.createobject("ADODB.connection")
conn.Connectionstring = "SERVER=localhost;DSN=news;uid=;pwd="
conn.ConnectionTimeout = 10
conn.Open
sql = "SELECT news_title FROM news"
set rs = conn.execute (sql)
response.write rs("news_title")
if conn.State = adStateOpen then
response.write "<br>connection is open!"
end if
rs.close
set rs = Nothing
conn.close
set conn = Nothing
' the next three lines of code does not run, because the conn.close commands really
worked!
' so the asp scripts does the connection closing correct!
' the problem must be in iis, myodbc or mysql - not asp - am I right?
if conn.State = adStateOpen then
response.write "<br>connection is still open!"
end if
%>
Best Regards,
Mads Vestergaard
System development
www.InvestorsUniverse.com
| Thread |
|---|
| • Too many connections (WIN NT, ASP, MySQL, MyODBC) problem | Mads Vestergaard | 23 Jul |
| • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problem | Sinisa Milivojevic | 24 Jul |
| • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problem | Mads Vestergaard | 24 Jul |
| • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problem | sinisa | 24 Jul |
| • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problem | Mads Vestergaard | 24 Jul |
| • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problem | Sinisa Milivojevic | 25 Jul |
| • RE: Too many connections (WIN NT, ASP, MySQL, MyODBC) problem | Rik Bradt | 25 Jul |
| • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problem | Mads Vestergaard | 25 Jul |