p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_components thread: Simultaneous access of ASP Files behaves abnormally


Message #1 by "Satishkumar Ganesan" <kgsat@y...> on Wed, 14 Mar 2001 11:50:06
Hi



I have the following code block. Now here i have a delaying mechanism thru 

For-loops which take the upper limit of the loop from a QueryString 

Parameter "Wait".

Now i tested the url with two IE windows open. The urls and sequence of 

calling is as follows

window 1 - http://pr-domain/satish/list_authors.asp?Wait=5000

window 2 - http://pr-domain/satish/list_authors.asp?Wait=0



I expect the result to be displayed in window 2 much before the result is 

displayed in window 1.



But the result in window 2 is displayed only after window 1 is rendered.

The code is being run on W2K machine.

The result is same on W98 with PWS



I am perplexed. Please help me



Regds

Satishkumar Ganesan



The following is the code block



<%

	set objXML = Server.CreateObject("Microsoft.xmlDOM")

	objXML.loadXML("<test><student studentid=""1"" 

studentname=""Satish"" mark1=""95"" mark2=""95"" mark3=""95"" 

mark4=""95""/><student studentid=""2"" studentname=""Reshmi"" mark1=""99"" 

mark2=""95"" mark3=""95"" mark4=""95""/><student studentid=""3"" 

studentname=""Andrew"" mark1=""97"" mark2=""100"" mark3=""95"" 

mark4=""95""/><student studentid=""4"" studentname=""Saravana"" 

mark1=""96"" mark2=""100"" mark3=""95"" mark4=""95""/></test>")

	set objChild = objXML.firstChild.firstChild

	set objXML = nothing

%>



<HTML>

<HEAD>

<TITLE>Author List</TITLE>

<STYLE TYPE="text/css">

  BODY {font-family:Veranda,Tahoma,Arial,sans-serif; font-size:10pt}

  TD {font-family:Veranda,Tahoma,Arial,sans-serif; font-size:10pt}

</STYLE>

</HEAD>

<BODY BGCOLOR=WHITE>

<H1>Student List</H1>

<HR>

<P>The following students are currently defined in the pubs database:



<TABLE border="1" cellspacing="2" cellpadding="0">

<TR>

   <TD bgcolor="#3AC2EF"><STRONG>ID</STRONG></TD>

   <TD bgcolor="#3AC2EF"><STRONG>Last Name</STRONG></TD>

   <TD bgcolor="#3AC2EF"><STRONG>First Name</STRONG></TD>

   <TD bgcolor="#3AC2EF"><STRONG>Contact No.</STRONG></TD>

</TR>

<TR>

</TR>

</table>

<% 

   Dim sID

   Dim sName

   Dim sMark1

   Dim sMark2

   Dim sMark3

   Dim sMark4



while not (objChild is nothing)

  		sID = objChild.attributes.getNamedItem

("studentid").nodeValue

		sName = objChild.attributes.getNamedItem

("studentname").nodeValue

		sMark1 = objChild.attributes.getNamedItem

("mark1").nodeValue

		sMark2 = objChild.attributes.getNamedItem

("mark2").nodeValue

		sMark3 = objChild.attributes.getNamedItem

("mark3").nodeValue

		sMark4 = objChild.attributes.getNamedItem

("mark4").nodeValue

%>

<table  border = "1" cellspacing="2" cellpadding="0">

<TR>

   <TD width="20" bgcolor="#FFFF6C"><%=sID%></TD>

   <TD width="80" bgcolor="#FFFF6C"><%=sName%></TD>

   <TD width="30" bgcolor="#FFFF6C"><%=sMark1%></TD>

   <TD width="30" bgcolor="#FFFF6C"><%=sMark2%></TD>

   <TD width="30" bgcolor="#FFFF6C"><%=sMark3%></TD>

   <TD width="30" bgcolor="#FFFF6C"><%=sMark4%></TD>

   <TD width="30" bgcolor="#3AC2EF">

      <FORM NAME="A" METHOD="POST" ACTION="edit_author.asp?au_id=<%=sID%>">

         <input type="SUBMIT" value="Edit" name="B1" />

      </FORM>

   </TD>

</TR>

</table>

<% 

   wait = cint( Request.QueryString("Wait"))

   for ii = 0 to wait

		for jj = 0 to wait

		next

   next 

   set objChild = objChild.NextSibling

   wend 

   set objChild = nothing

%>

</BODY>

</HTML>



Message #2 by Robert Chartier <rchartierh@a...> on Wed, 14 Mar 2001 09:20:50 -0500
why are you attempting to make one page wait?







At 06:50 AM 3/14/01, you wrote:

>Hi

>

>I have the following code block. Now here i have a delaying mechanism thru

>For-loops which take the upper limit of the loop from a QueryString

>Parameter "Wait".

>Now i tested the url with two IE windows open. The urls and sequence of

>calling is as follows

>window 1 - http://pr-domain/satish/list_authors.asp?Wait=5000

>window 2 - http://pr-domain/satish/list_authors.asp?Wait=0

>

>I expect the result to be displayed in window 2 much before the result is

>displayed in window 1.

>

>But the result in window 2 is displayed only after window 1 is rendered.

>The code is being run on W2K machine.

>The result is same on W98 with PWS

>

>I am perplexed. Please help me

>

>Regds

>Satishkumar Ganesan

>

>The following is the code block

>

><%

>         set objXML = Server.CreateObject("Microsoft.xmlDOM")

>         objXML.loadXML("<test><student studentid=""1""

>studentname=""Satish"" mark1=""95"" mark2=""95"" mark3=""95""

>mark4=""95""/><student studentid=""2"" studentname=""Reshmi"" mark1=""99""

>mark2=""95"" mark3=""95"" mark4=""95""/><student studentid=""3""

>studentname=""Andrew"" mark1=""97"" mark2=""100"" mark3=""95""

>mark4=""95""/><student studentid=""4"" studentname=""Saravana""

>mark1=""96"" mark2=""100"" mark3=""95"" mark4=""95""/></test>")

>         set objChild = objXML.firstChild.firstChild

>         set objXML = nothing

>%>

>

>

>

>Student List

>

>

>

>

>----------

>The following students are currently defined in the pubs database:

>ID Last Name First Name Contact No.

><% Dim sID Dim sName Dim sMark1 Dim sMark2 Dim sMark3 Dim sMark4 while not 

>(objChild is nothing) sID = objChild.attributes.getNamedItem 

>("studentid").nodeValue sName = objChild.attributes.getNamedItem 

>("studentname").nodeValue sMark1 = objChild.attributes.getNamedItem 

>("mark1").nodeValue sMark2 = objChild.attributes.getNamedItem 

>("mark2").nodeValue sMark3 = objChild.attributes.getNamedItem 

>("mark3").nodeValue sMark4 = objChild.attributes.getNamedItem 

>("mark4").nodeValue %>

><%=sID%> <%=sName%> <%=sMark1%> <%=sMark2%> <%=sMark3%> <%=sMark4%>

><% wait = cint( Request.QueryString("Wait")) for ii = 0 to wait for jj = 0 

>to wait next next set objChild = objChild.NextSibling wend set objChild = 

>nothing %>





Robert Chartier

Author, AspFree.com

xxx-xxx-xxxx

rchartierh@a...

http://www.aspfree.com/devlinks

http://www.aspfree.com/authors/robert

http://www.aspalliance.com/nothingmn



Message #3 by "Peter Lanoie" <planoie@e...> on Wed, 14 Mar 2001 14:44:43 -0500
The web server doesn't really run the pages "Simultaneously".  So when you

have one page that ties up the processor for some time, that's it.  If the

second page request is sent after the first, but the first is still working,

then the second request will just sit there like you are seeing until the

first is done processing.



Why are you trying to do this?



-----Original Message-----

From: Satishkumar Ganesan [mailto:kgsat@y...]

Sent: Wednesday, March 14, 2001 6:50 AM

To: ASP components

Subject: [asp_components] Simultaneous access of ASP Files behaves

abnormally





Hi



I have the following code block. Now here i have a delaying mechanism thru

For-loops which take the upper limit of the loop from a QueryString

Parameter "Wait".

Now i tested the url with two IE windows open. The urls and sequence of

calling is as follows

window 1 - http://pr-domain/satish/list_authors.asp?Wait=5000

window 2 - http://pr-domain/satish/list_authors.asp?Wait=0



I expect the result to be displayed in window 2 much before the result is

displayed in window 1.



But the result in window 2 is displayed only after window 1 is rendered.

The code is being run on W2K machine.

The result is same on W98 with PWS



I am perplexed. Please help me



Regds

Satishkumar Ganesan



The following is the code block



<%

	set objXML = Server.CreateObject("Microsoft.xmlDOM")

	objXML.loadXML("<test><student studentid=""1""

studentname=""Satish"" mark1=""95"" mark2=""95"" mark3=""95""

mark4=""95""/><student studentid=""2"" studentname=""Reshmi"" mark1=""99""

mark2=""95"" mark3=""95"" mark4=""95""/><student studentid=""3""

studentname=""Andrew"" mark1=""97"" mark2=""100"" mark3=""95""

mark4=""95""/><student studentid=""4"" studentname=""Saravana""

mark1=""96"" mark2=""100"" mark3=""95"" mark4=""95""/></test>")

	set objChild = objXML.firstChild.firstChild

	set objXML = nothing

%>



<HTML>

<HEAD>

<TITLE>Author List</TITLE>

<STYLE TYPE="text/css">

  BODY {font-family:Veranda,Tahoma,Arial,sans-serif; font-size:10pt}

  TD {font-family:Veranda,Tahoma,Arial,sans-serif; font-size:10pt}

</STYLE>

</HEAD>

<BODY BGCOLOR=WHITE>

<H1>Student List</H1>

<HR>

<P>The following students are currently defined in the pubs database:



<TABLE border="1" cellspacing="2" cellpadding="0">

<TR>

   <TD bgcolor="#3AC2EF"><STRONG>ID</STRONG></TD>

   <TD bgcolor="#3AC2EF"><STRONG>Last Name</STRONG></TD>

   <TD bgcolor="#3AC2EF"><STRONG>First Name</STRONG></TD>

   <TD bgcolor="#3AC2EF"><STRONG>Contact No.</STRONG></TD>

</TR>

<TR>

</TR>

</table>

<%

   Dim sID

   Dim sName

   Dim sMark1

   Dim sMark2

   Dim sMark3

   Dim sMark4



while not (objChild is nothing)

  		sID = objChild.attributes.getNamedItem

("studentid").nodeValue

		sName = objChild.attributes.getNamedItem

("studentname").nodeValue

		sMark1 = objChild.attributes.getNamedItem

("mark1").nodeValue

		sMark2 = objChild.attributes.getNamedItem

("mark2").nodeValue

		sMark3 = objChild.attributes.getNamedItem

("mark3").nodeValue

		sMark4 = objChild.attributes.getNamedItem

("mark4").nodeValue

%>

<table  border = "1" cellspacing="2" cellpadding="0">

<TR>

   <TD width="20" bgcolor="#FFFF6C"><%=sID%></TD>

   <TD width="80" bgcolor="#FFFF6C"><%=sName%></TD>

   <TD width="30" bgcolor="#FFFF6C"><%=sMark1%></TD>

   <TD width="30" bgcolor="#FFFF6C"><%=sMark2%></TD>

   <TD width="30" bgcolor="#FFFF6C"><%=sMark3%></TD>

   <TD width="30" bgcolor="#FFFF6C"><%=sMark4%></TD>

   <TD width="30" bgcolor="#3AC2EF">

      <FORM NAME="A" METHOD="POST" ACTION="edit_author.asp?au_id=<%=sID%>">

         <input type="SUBMIT" value="Edit" name="B1" />

      </FORM>

   </TD>

</TR>

</table>

<%

   wait = cint( Request.QueryString("Wait"))

   for ii = 0 to wait

		for jj = 0 to wait

		next

   next

   set objChild = objChild.NextSibling

   wend

   set objChild = nothing

%>

</BODY>

</HTML>





---

SoftArtisans helps developers build robust, scalable Web applications!

Excel Web reports, charts: http://www.softartisans.com/excelwriter.html

File uploads: http://www.softartisans.com/saf.html

Transactional file management: http://www.softartisans.com/saf1.html

Scalability: http://www.softartisans.com/saxsession.html

ASPstudio value pack: http://www.softartisans.com/aspstudiosuite.html




$subst('Email.Unsub')




  Return to Index