List:MySQL on Win32« Previous MessageNext Message »
From:Mads Vestergaard Date:July 25 2000 4:00pm
Subject:Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problem
View as plain text  
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) problemMads Vestergaard23 Jul
  • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problemSinisa Milivojevic24 Jul
  • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problemMads Vestergaard24 Jul
    • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problemsinisa24 Jul
  • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problemMads Vestergaard24 Jul
    • Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problemSinisa Milivojevic25 Jul
      • RE: Too many connections (WIN NT, ASP, MySQL, MyODBC) problemRik Bradt25 Jul
Re: Too many connections (WIN NT, ASP, MySQL, MyODBC) problemMads Vestergaard25 Jul