I'll be more specific.
In the example below, the first time I open SELECT.HTM, and select
Blue, REPORT.ASP will use the recordset to create the spreadsheet and
it will return the blue data. If I click on the "Return to Selection
Page" link on the spreadsheet to go back to the SELECT.HTM Page and
select Red, REPORT.ASP will display the Blue Data instead of the Red
data.
How can I make sure that the file is replaced??
<html>
<head>
<title>SELECT.HTM</title>
</head>
<body>
<form action="report.asp" method="post" name="report">
<input type="radio" name="MyOption" value="Blue">Blue<br>
<input type="radio" name="MyOption" value="Red">Red
</form>
</body>
</html>
****************************************************************************************************
****************************************************************************************************
<html>
<head>
<title>REPORT.ASP</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<%
Response.ContentType = "application/vnd.ms-excel"
set cOra = server.createobject("adodb.connection")
set RS = server.createobject("adodb.recordset")
cOra.open "Provider=sqloledb;Data Source=My Data Source;User
ID=MyId;Password=MyPassword"
set RS=cOra.execute("select * from MyTable where " &
request.Form("MyOption"))
%>
<TABLE BORDER=1>
<TR><TD><A HREF="select.htm">Return to Selection Page</A></TD></TR>
<TR>
<%
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' % Loop through Fields Names and print out the Field Names
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
For i = 0 to RS.Fields.Count - 1
%>
<TD><B><% = RS(i).Name %></B></TD>
<% Next %>
</TR>
<%
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' % Loop through rows, displaying each field
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Do While Not RS.EOF
%>
<TR>
<% For i = 0 to RS.Fields.Count - 1
%>
<TD VALIGN=TOP><% = RS(i).value %></TD>
<% Next %>
</TR>
<%
RS.MoveNext
Loop
RS.Close
set cOra=Nothing
%>
</TABLE>
</body>
</html>