Morning all,
I've inherited a very shaky codeset from my predecessor and i'm struggling to put it all right... making good progress with bringing it up to scratch, but.....
For some time now i've been trying to resolve an issue where our SQL server suddenly eats up the CPU usage and has to be forcibly reset.
I've now successfully tracked the issue down to one particular page. If the recordsets needed are short then it doesn't have an issue, but if there's a lot (and by a lot i mean 50+, so not a stretch by any means!), it doesn't even load the page and just hangs up the server instead (mysqld.exe uses 99% of the CPU time and doesn't let go even after closing the browser window!).....
If anyone has any thoughts i'd appreciate it, it's somewhat annoying to say the least!
coding involved:
Thanks!
Barry
I've inherited a very shaky codeset from my predecessor and i'm struggling to put it all right... making good progress with bringing it up to scratch, but.....
For some time now i've been trying to resolve an issue where our SQL server suddenly eats up the CPU usage and has to be forcibly reset.
I've now successfully tracked the issue down to one particular page. If the recordsets needed are short then it doesn't have an issue, but if there's a lot (and by a lot i mean 50+, so not a stretch by any means!), it doesn't even load the page and just hangs up the server instead (mysqld.exe uses 99% of the CPU time and doesn't let go even after closing the browser window!).....
If anyone has any thoughts i'd appreciate it, it's somewhat annoying to say the least!
coding involved:
VB.NET:
<%
Dim gobjConn, gobjRS
Dim hobjRS
Dim Code
gobjConn = Server.CreateObject("ADODB.Connection")
gobjConn.Open(sConnection)
gobjRS = gobjConn.Execute("SELECT * FROM oe WHERE Manufacturer = '" & trim(Request.querystring("Man")) & "' ORDER BY OE ASC")
if gobjrs.eof then
%>
<div align="center">No Parts Found for this Manufacturer entered.</div>
<%
else
While Not gobjRS.EOF
%>
<table align="center">
<tr>
<td align="left" width="100">
<%
response.write("<a href='searchresultsbymanufacturer.aspx?txtManCode=" & trim(gobjRS.Fields("oe").Value) & "'>")
hobjRS = gobjConn.Execute("SELECT DISTINCT * FROM parts WHERE FacetPartNo LIKE '%" & gobjRS.fields("ProductCode").value & "%'")
response.write("<b>" & gobjRS.Fields("oe").Value & "<b>") %>
</a>
</td>
<td width="125" align="center"><%
If hobjRS.EOF OR hobjRS.BOF Then
%>No data available </td><td width="125"> </td><%
Else
response.write(hobjRS.Fields("Type").Value) %></td>
<td width="125" align="center"><% response.write("<a href='searchresultsbymanufacturer.aspx?txtManCode=" & trim(gobjRS.Fields("oe").Value) & "'>")%>More Info & Pricing</a></td>
<%
End If
%>
Thanks!
Barry