Ask a Question related to ASP Database, Design and Development.
-
Michael Netherton #1
Large SQL table causes web page to hang
I am querying a large SQL database table and when the result set is large (over 1000 records), the browser just clocks and I have to wait for the session to time out and then the recordset will be displayed. I''ve tried setting response.flush to get the for next loop to display the data as it''s retrieved. No luck. The page won''t display anything until the for next loop completes or the page times out. The code is below:
if not rs.EOF then
rc = 0
while not rs.EOF
Response.Write "<tr>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1''><font face=''verdana'' size=''2''><nobr>" & rs("num") & "</nobr></font></td>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1''><font face=''verdana'' size=''2''>" & rs("cst") & "</font></td>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1''><font face=''verdana'' size=''2''>" & rs("dist") & "</font></td>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1''><font face=''verdana'' size=''2''>" & rs("art") & "</font></td>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1''><font face=''verdana'' size=''2''>" & rs("pd") & "</font></td>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1''><font face=''verdana'' size=''2''>" & rs("shp") & "</font></td>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1''><font face=''verdana'' size=''2''>" & rs("imp") & "</font></td>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1''><font face=''verdana'' size=''2''><nobr>" & rs("mdnum") & "</nobr></font></td>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1''><font face=''verdana'' size=''2''>" & rs("MRC") & "</font></td>" & vbcrlf
Response.Write "<td style=''border-left-style: solid; border-left-width: 1;border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1''><a href=''edit.asp?id=" & rs("ID") & "''><font face=''verdana'' size=''2'' color=''#000000''>" & rs("ID") & "</font></a></td>" & vbcrlf
Response.Write "</tr>" & vbcrlf
Response.Flush
'' Response.Buffer = true
rs.MoveNext
rc = rc + 1
wend
end if
-----------------------------
This message is posted by [url]http://Asp.ForumsZone.com[/url]
Michael Netherton Guest
-
Large page tiles use extra sheets unless I shrink page
Hello Tim, I don't see that you got an answer. I've never done this before. My original will be 18" x 24" and I want to keep the sizing the same.... -
.CFM page requests hang; .HTM pages don't
We're experiencing a strange performance issue with CFMX7 on a Win 2003 IIS box. No database. Essentially, the pages we've built are relatively... -
Edit Page Hang-up in 3.11
I had a similar problem all of a sudden contribute would close itself when trying to edit page. Ended up being a permissions isssue. Use debug to... -
Going for a LARGE Table: Any Tips?
Hi there I'm developing a large web application. Part of this web application will be storing numerical chart data in a MySQL table - these... -
Large table creation
Hello Jim, There should be no other way to do so. The for loop could be used to create a big talbe. Have you tested the page to see if it is... -
only me #2
Re: Large SQL table causes web page to hang
sorry : forgot to say, look at 'paging' the data into more mangable 'screen'
sized chunks
"Michael Netherton" <mnetherton@mocap.com> wrote in message
news:301525267425581@Asp.ForumsZone.com...(over 1000 records), the browser just clocks and I have to wait for the> I am querying a large SQL database table and when the result set is large
session to time out and then the recordset will be displayed. I''ve tried
setting response.flush to get the for next loop to display the data as it''s
retrieved. No luck. The page won''t display anything until the for next
loop completes or the page times out. The code is below:1; border-bottom-style: solid; border-bottom-width: 1''><font>
> if not rs.EOF then
> rc = 0
> while not rs.EOF
> Response.Write "<tr>" & vbcrlf
> Response.Write "<td style=''border-left-style: solid; border-left-width:
face=''verdana'' size=''2''><nobr>" & rs("num") & "</nobr></font></td>" &
vbcrlf1; border-bottom-style: solid; border-bottom-width: 1''><font> Response.Write "<td style=''border-left-style: solid; border-left-width:
face=''verdana'' size=''2''>" & rs("cst") & "</font></td>" & vbcrlf1; border-bottom-style: solid; border-bottom-width: 1''><font> Response.Write "<td style=''border-left-style: solid; border-left-width:
face=''verdana'' size=''2''>" & rs("dist") & "</font></td>" & vbcrlf1; border-bottom-style: solid; border-bottom-width: 1''><font> Response.Write "<td style=''border-left-style: solid; border-left-width:
face=''verdana'' size=''2''>" & rs("art") & "</font></td>" & vbcrlf1; border-bottom-style: solid; border-bottom-width: 1''><font> Response.Write "<td style=''border-left-style: solid; border-left-width:
face=''verdana'' size=''2''>" & rs("pd") & "</font></td>" & vbcrlf1; border-bottom-style: solid; border-bottom-width: 1''><font> Response.Write "<td style=''border-left-style: solid; border-left-width:
face=''verdana'' size=''2''>" & rs("shp") & "</font></td>" & vbcrlf; border-bottom-style: solid; border-bottom-width: 1''><font> Response.Write "<td style=''border-left-style: solid; border-left-width: 1
face=''verdana'' size=''2''>" & rs("imp") & "</font></td>" & vbcrlf1; border-bottom-style: solid; border-bottom-width: 1''><font> Response.Write "<td style=''border-left-style: solid; border-left-width:
face=''verdana'' size=''2''><nobr>" & rs("mdnum") & "</nobr></font></td>" &
vbcrlf1; border-bottom-style: solid; border-bottom-width: 1''><font> Response.Write "<td style=''border-left-style: solid; border-left-width:
face=''verdana'' size=''2''>" & rs("MRC") & "</font></td>" & vbcrlf1;border-right-style: solid; border-right-width: 1; border-bottom-style:> Response.Write "<td style=''border-left-style: solid; border-left-width:
solid; border-bottom-width: 1''><a href=''edit.asp?id=" & rs("ID") &
"''><font face=''verdana'' size=''2'' color=''#000000''>" & rs("ID") &
"</font></a></td>" & vbcrlf> Response.Write "</tr>" & vbcrlf
> Response.Flush
> '' Response.Buffer = true
> rs.MoveNext
> rc = rc + 1
> wend
> end if
>
> -----------------------------
> This message is posted by [url]http://Asp.ForumsZone.com[/url]
>
only me Guest
-
Jeff Cochran #3
Re: Large SQL table causes web page to hang
On Tue, 15 Jul 2003 14:26:39 -0700, "Michael
Netherton"<mnetherton@mocap.com> wrote:
How about using cursors? Do a Google for "Recordset Paging" and>I am querying a large SQL database table and when the result set is large (over 1000 records), the browser just clocks and I have to wait for the session to time out and then the recordset will be displayed.
you'll find a number of solutions. In SQL you could also sort then
select the TOP xxx records or similar with a stored procedure.
Jeff
===================================
Jeff Cochran (IIS MVP)
[email]jcochran.nospam@naplesgov.com[/email] - Munged of Course
I don't get much time to respond to direct email,
so posts here will have a better chance of getting
an answer. Besides, everyone benefits here.
Suggested resources:
[url]http://www.iisfaq.com/[/url]
[url]http://www.iisanswers.com/[/url]
[url]http://www.iistoolshed.com/[/url]
[url]http://securityadmin.info/[/url]
[url]http://www.aspfaq.com/[/url]
[url]http://support.microsoft.com/[/url]
====================================
Jeff Cochran Guest



Reply With Quote

