-
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?
-
well, did u try these queries on the database itself, not thru ASP?
or running the code thru VB?
-
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.
-
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. :)