ACC97: ASP Page Based on a Parameter Query May Not Refresh (190529)
The information in this article applies to:
This article was previously published under Q190529 Advanced: Requires expert coding, interoperability, and multiuser skills.
SYMPTOMS
An Active Server Page (ASP) with parameters may not return the expected
results after it is run the first time.
CAUSE
You may experience this problem when the following conditions are true:
- You create a form based on a parameter query.
-and-
- You save a form, from Microsoft Access, as an ASP file.
-and-
- You run the query a second time and use different parameters.
-and-
- You run the query before the Web server's "session timeout" is over.
RESOLUTION
NOTE: This section contains information about editing ASP files, and
assumes that you are familiar with editing ASP files. Microsoft Access
Product Support professionals do not support customization of any HTML, HTX,
IDC, or ASP files.
You can correct this behavior by clearing the session object through
script. Once you know the session name, add the script below to the .html
file that prompts you for the parameter.
Determine the Session Name- Use Notepad or another text editor to open the <filename>.asp or
<filename>alx.asp file created by Microsoft Access.
- Look for the line:
Set rs = Session("<SessionName>")
The name that appears between the quotation marks is the session name.
Edit the HTML file- Use Notepad or another text editor to open the <filename>.html file
created by Microsoft Access.
- Type the five lines below after the <BODY> tag.
<%
If IsObject(Session("<SessionName>")) Then
session.abandon
End if
%>
- Save the file as the same Qry<filename>.asp. Note that the file will
need to have a .asp extension instead of a .html extension.
Modification Type: | Major | Last Reviewed: | 10/20/2003 |
---|
Keywords: | kbprb KB190529 |
---|
|