Large SQL table causes web page to hang

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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....
    2. .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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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...
    > 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]
    >

    only me Guest

  4. #3

    Default Re: Large SQL table causes web page to hang

    On Tue, 15 Jul 2003 14:26:39 -0700, "Michael
    Netherton"<mnetherton@mocap.com> wrote:
    >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.
    How about using cursors? Do a Google for "Recordset Paging" and
    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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139