Microsoft KB Archive/199233

= How to Use DHTML with ASP and Long SQL Queries =

Article ID: 199233

Article Last Modified on 6/23/2005

-

APPLIES TO


 * Microsoft Internet Information Server 3.0
 * Microsoft Internet Information Server 4.0

-



This article was previously published under Q199233



We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/prodtech/IIS.mspx



SUMMARY
When SQL Server queries take a great deal of time to process in an ASP page, the Web browser may be left with a blank page while information is gathered from the database. If you use Internet Explorer's Dynamic HTML features, a message can be displayed to a Web browser while the data is processed and then changed or erased when the page is finished being rendered.



MORE INFORMATION
The following example ASP code uses a system Data Source Name (DSN) that points to the Adventure Works example Microsoft Access database that shipped with IIS 3.0, but can be tested with any data source by changing the following two lines:

strSQL = "SELECT * FROM " & vbCrLf End If  %>

 HideMe.innerText='<%=RS.RecordCount%> Record(s) displayed.'

<% RS.Close %>

The above code can easily be modified to erase the message from the page by changing the script section to read as follows:

HideMe.style.display='none';

Additional query words: jscript javascript scripting dhtml asp html

Keywords: kbhowto KB199233

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.