Results 1 to 4 of 4

Thread: PWS Limitations ?

  1. #1

    Thread Starter
    Lively Member Nator's Avatar
    Join Date
    Nov 1999
    Location
    East Larryville, GA
    Posts
    80

    PWS Limitations ?

    Does anyone know if PWS limits the number of recordsets you can create on one ASP? I am trying to write out a hierarchy of years and their months using two recordsets. For some reason, my second recordset is totally ignored. Unfortunatley, I am being forced to use PWS right now.

    Something like this:

    Function WriteStuff ()
    dim strTemp

    strTemp = ""

    set rst1 = Server.CreateObject("ADODB.recordset")
    rst1.open "SELECT DISTINCT years FROM applogs"

    While Not rst1.eof
    strTemp = strTemp & "Year " & vbcrlf
    rst1.movenext
    wend

    set rst2 = Server.CreateObject("ADODB.recordset")
    rst2.open "SELECT DISTINCT months FROM applogs"
    ' Returns more records than rst1
    while not rst2.eof
    strTemp = strTemp & "Months" & vbcrlf
    rst2.movenext
    wend
    set rst1 = nothing
    set rst2 = nothing
    WriteStuff = strTemp
    end function

    <HTML>
    <BODY>
    <% Response.Write WriteStuff %>
    </BODY>
    </HTML>

    Any ideas?

  2. #2
    spetnik
    Guest
    well, did u try these queries on the database itself, not thru ASP?
    or running the code thru VB?

  3. #3
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Are you sure you are getting data from the 2nd query? If it isn't(And rst2.EOF is true), the code block that assigns something to strTemp will not be executed so WriteStuff will be assigned an empty string.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  4. #4
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    I read in an artical on the net (don't have the link). But you are actually slowing down your pages using

    strings = string & Rs("Field") & vbcrlf

    and later in HTML do the <%=strings%>.

    method.

    Use response.write instead. I will look for the link. BUT IT IS ALLOT SLOWER (the method u using). In a thousand recordset it was like 10 seconds slower than response.write.

    P.S Just a tip.

Posting Permissions

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



Click Here to Expand Forum to Full Width