Hi,
I have a small ASP script which queries a SQL Server 2000 database. The query is a simple select statement and returns ~28000 rows. The query runs in about 4 secs from query analyser. My code is:
<%@ Language=VBScript %>
<!-- #INCLUDE VIRTUAL "/includes/DataSource.asp" -->
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
Server.ScriptTimeout = 999999999
count = 1
set conn = server.createobject("adodb.connection"
conn.open strConnect
SQLQuery = "SELECT eid,min([timestamp]) as [timestamp] FROM open_track WHERE cid ='2' GROUP BY eid"
set rs = server.createobject("adodb.recordset"
res = ""
rs.open SQLQuery, conn
If rs.EOF and rs.BOF then
result = result & "No Data Avalable"
Else
rs.MoveFirst
while Not rs.BOF and Not rs.EOF
res = res & rs("eid" & " : " & rs("timestamp" & "<br />"
rs.movenext
count = count +1
wend
End If
rs.close
conn.close()
Set conn = nothing
test = result
response.write res
%>
</BODY>
</HTML>
The script completely locks up the server.
I think that the problem could be to do with building such a large string (approx 900000 characters), but I really need to do this. Is there any way that anyone can think of to get whatI want?
Thanks in advance - phatoo-er
I have a small ASP script which queries a SQL Server 2000 database. The query is a simple select statement and returns ~28000 rows. The query runs in about 4 secs from query analyser. My code is:
<%@ Language=VBScript %>
<!-- #INCLUDE VIRTUAL "/includes/DataSource.asp" -->
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
Server.ScriptTimeout = 999999999
count = 1
set conn = server.createobject("adodb.connection"
conn.open strConnect
SQLQuery = "SELECT eid,min([timestamp]) as [timestamp] FROM open_track WHERE cid ='2' GROUP BY eid"
set rs = server.createobject("adodb.recordset"
res = ""
rs.open SQLQuery, conn
If rs.EOF and rs.BOF then
result = result & "No Data Avalable"
Else
rs.MoveFirst
while Not rs.BOF and Not rs.EOF
res = res & rs("eid" & " : " & rs("timestamp" & "<br />"
rs.movenext
count = count +1
wend
End If
rs.close
conn.close()
Set conn = nothing
test = result
response.write res
%>
</BODY>
</HTML>
The script completely locks up the server.
I think that the problem could be to do with building such a large string (approx 900000 characters), but I really need to do this. Is there any way that anyone can think of to get whatI want?
Thanks in advance - phatoo-er