Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Re-using recordset results

Status
Not open for further replies.

NattyP

MIS
Sep 1, 2001
45
0
0
JM
Hi,

Problem: I have an ASP page that executes a SELECT query then displays all records in a table. The pages takes a few seconds to load, with no indication that work is being done.

I am looking at optimizing the database query, please don't suggest that. I am already on it. Additionally, I want to evaluate a server-side solution.

Question: In ASP classic, How can I ...

a) Perform the select statement in one page (I would display an animated "please wait" message here), then call another page to move through the records and display them

b) Execute the query and build the page in the background, while I display an animated "please wait" message. I would have to detect when the page is done then simply redirect to it.

If these approaches are too far fetched, then what would you recommend.

I dont want a client-side solution because I dont want to rely on JavaScript being enabled.

Thanks in advance.
 
I think the nicest way is an AJAX call that uses the if xmlhttp.readyState==2 to display a "Please wait loading" text.

I realize you do not want to rely on Javascript being enabled, but I think the number of browsers who meet that condition is small.

Here is a article on degradable Ajax for when javascript is not working.

If you really want a pure ASP solution I think you use response.buffer and response.flush.


I think you do:
write something
response.buffer
do your big thing
response.flush

but I have never had a call to use it.

Someone else will know for sure, but you can play around with it until they post.
 
Thanks. I didn't know about response.flush. I will look further.

I also take your comment on the JavaScript. I expect that majority of users would have it enabled, but since by default I have it off, I may have focused on my case too much.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top