HI all, I have a real strange problem, I have created an ASP page to show an index over movies that I have, but It makes my server go berserk, a process called DLLHOST starts using 95-100% CPU and eats huge amount of memory as soon as I try to open the page.
The page is timing out after a while and never shows any results.
Here is the code for the page.
Description of problem on the end.
--- Start of Script ---
--- End of Script ---
The problem is for sure with the last lines opening the rs2 recordset.
If I remove the lines for rs2 the script runs smooth, but is of cource not performing what it should.
A note should be that at the moment there are only 30 records, so I can not see that it should be the amount of records it opens.
I tried to run the SQL query directly in the SQL Manager on the server and there it runs fine and shows the records.
And as you can see ther is hardly any difference between rs and rs2 in the script. it opens the same amount of records, well actually, rs opens all of them while rs2 only opens selected records.
Any help would be higly appreciated.
Kind regards.
Brian.
Eldaria
That was my 25cent** of opinion.
** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.
The page is timing out after a while and never shows any results.
Here is the code for the page.
Description of problem on the end.
--- Start of Script ---
Code:
<html>
<head>
<link rel="stylesheet" type="text/css" href="/style.css" />
<title>Eldaria Movie Zone</title>
</head>
<p align="center"><img src="/images/moviezone.jpg" alt="Eldaria Movie Zone Logo"></p>
<p><h3>Welcome to Eldaria Movie Zone.</h3></p>
<b><u>Please select a letter:</u></b><br>
<%
set conn=Server.CreateObject("ADODB.Connection")
Constr="DRIVER={SQL Server};SERVER=**hidden**;UID=**hidden**;PWD=**hidden**;DATABASE=MovieIndex"
conn.Open Constr
set rs=Server.CreateObject("ADODB.recordset")
set rs2=Server.CreateObject("ADODB.recordset")
select case request.querystring("Alphab")
case ""
rs.open "SELECT tbl_Movie.Title FROM tbl_Movie ORDER BY tbl_Movie.Title", conn
response.write("- ")
do until rs.eof
PrLetter = FiLetter
FiLetter = left(rs.fields("Title").value,1)
If PrLetter = FiLetter then
rs.movenext
else
response.write("<a class='two' href='browse.asp?Alphab=" & FiLetter & "'><b>" & Filetter & "</a> - </b>")
end if
loop
case else
rs.open "SELECT tbl_Movie.Title FROM tbl_Movie ORDER BY tbl_Movie.Title", conn
response.write("- ")
do until rs.eof
PrLetter = FiLetter
FiLetter = left(rs.fields("Title").value,1)
If PrLetter = FiLetter then
rs.movenext
else
response.write("<a class='two' href='browse.asp?Alphab=" & FiLetter & "'><b>" & Filetter & "</a> - </b>")
end if
loop
response.write("<br><br><b><u>Or Select the movie you want more information about:</u></b><br>")
qstr = request.querystring("Alphab")
response.write("<br>" & qstr & "<br>")
rs2.open "SELECT MovieID, Title, LEFT(Title, 1) AS Letter FROM tbl_Movie WHERE (LEFT(Title, 1) = '" & qstr & "')", conn
do until rs2.eof
response.write(rs2.fields("Title").value)
loop
end select
%>
</html>
The problem is for sure with the last lines opening the rs2 recordset.
If I remove the lines for rs2 the script runs smooth, but is of cource not performing what it should.
A note should be that at the moment there are only 30 records, so I can not see that it should be the amount of records it opens.
I tried to run the SQL query directly in the SQL Manager on the server and there it runs fine and shows the records.
And as you can see ther is hardly any difference between rs and rs2 in the script. it opens the same amount of records, well actually, rs opens all of them while rs2 only opens selected records.
Any help would be higly appreciated.
Kind regards.
Brian.
Eldaria
That was my 25cent** of opinion.
** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.