dhborchardt
MIS
I am haveing a problem with the below page. When I come from the first page "20AddNewME.asp" everything works fine. strQSMEID is set to the querstring value from the previous page. This value is used in the SQL to pull the correct RS and the fields are completed correctly. I am able to change the value for the Location field and hit submit. This will send it to 24ProcAddEdit.asp. This page will update the database and set a Session variable "SV24MEID" and then Respons.Redirect back to the page in question "22AddEditMEPM". The IF Else Then will determine which page it came from and set the strQSMEID variable correctly. When the page redirects, the value for location did not change. When I check the database the value for location has been changed correctly. If I click the submit button again, then I will see the correct value for location. For some reason when the page runs again after being redirected back to this page the recordset does not get re-run. Is there some way I can force this to happen. I tried using the recordset resync method but I am using IIS 4 so I guess that is not supported. If I hit the refresh button on the browser I get a a message that says " The page cannot be refreshed without resending the information. Click retry to resend the information." Is there a way to force this retry?
Sorry for writing a novel.
Thanks
Dale
<%@ Language=VBScript %>
<!--#include file="adovbs.inc"-->
<!-- #INCLUDE FILE="DataStore.inc" -->
<BODY>
page 22 <BR>
<%
Dim oConn22, oRS22, strConnect, strQSMEID, SQL22
Set oConn22 = Server.CreateObject("ADODB.Connection"
'Open Connection
oConn22.Open strConnect
'Begin HOW DID WE GET HERE
If InStr(Request.ServerVariables("HTTP_REFERER"
, "22AddEditMEPM.asp"
Then
strQSMEID = Session("sv24MEID"
Response.Write "You came from 24"
Response.Write Session("sv24MEID"
ElseIf InStr(Request.ServerVariables("HTTP_REFERER"
, "20AddNewME.asp"
Then
strQSMEID =Request.QueryString ("MEID"
Response.Write "You came from 20"
ElseIF InStr(Request.ServerVariables("HTTP_REFERER"
, "24ProcAddEdit.asp"
Then
strQSMEID = Session("sv24MEID"
Response.Write "You came from 24"
Else
Response.Write "Where did you come from?"
End If
'End HOW DID WE GET HERE
SQL22 = "SELECT tblEquipment.MEID, tblEquipment.Location, tblEquipment.Type, "
SQL22 = SQL22 & " tblEquipment.SerialNumber, tblEquipment.Model, tblEquipment.Specs, tblEquipment.MEDate"
SQL22 = SQL22 & " FROM tblEquipment WHERE (((tblEquipment.MEID)= " & strQSMEID & "
);"
Set oRS22 = Server.CreateObject ("ADODB.Recordset"
oRS22.Open SQL22, oConn22
oRS22.Resync
oRS22.MoveFirst
%>
<Form Action=24ProcAddEdit.asp Method=post Name=22AddEditMEPM>
<BR>
MEID   <Input Type="Text" Name="MEID" Value=" <%Response.Write oRS22("MEID"
%>"><BR>
Location   <Input Type="Text" Name="Location" Value=" <%Response.Write oRS22("Location"
%>"><BR>
Type   <Input Type="Text" Name="Type" Value=" <%Response.Write oRS22("Type"
%>"><BR>
Serial Number   <Input Type="Text" Name="SerialNumber" Value=" <%Response.Write oRS22("SerialNumber"
%>"><BR>
Model   <Input Type="Text" Name="Model" Value=" <%Response.Write oRS22("Model"
%>"><BR>
Specs   <Input Type="Text" Name="Specs" Value=" <%Response.Write oRS22("Specs"
%>"><BR>
Date MEID was entered   <Input Type="Text" Name="MEDate" Value=" <%Response.Write oRS22("MEDate"
%>"><BR>
<input type=submit value=Submit id=submit1 name=submit1>"
</Form>
</BODY>
</HTML>
Sorry for writing a novel.
Thanks
Dale
<%@ Language=VBScript %>
<!--#include file="adovbs.inc"-->
<!-- #INCLUDE FILE="DataStore.inc" -->
<BODY>
page 22 <BR>
<%
Dim oConn22, oRS22, strConnect, strQSMEID, SQL22
Set oConn22 = Server.CreateObject("ADODB.Connection"
oConn22.Open strConnect
'Begin HOW DID WE GET HERE
If InStr(Request.ServerVariables("HTTP_REFERER"
strQSMEID = Session("sv24MEID"
Response.Write "You came from 24"
Response.Write Session("sv24MEID"
ElseIf InStr(Request.ServerVariables("HTTP_REFERER"
strQSMEID =Request.QueryString ("MEID"
Response.Write "You came from 20"
ElseIF InStr(Request.ServerVariables("HTTP_REFERER"
strQSMEID = Session("sv24MEID"
Response.Write "You came from 24"
Else
Response.Write "Where did you come from?"
End If
'End HOW DID WE GET HERE
SQL22 = "SELECT tblEquipment.MEID, tblEquipment.Location, tblEquipment.Type, "
SQL22 = SQL22 & " tblEquipment.SerialNumber, tblEquipment.Model, tblEquipment.Specs, tblEquipment.MEDate"
SQL22 = SQL22 & " FROM tblEquipment WHERE (((tblEquipment.MEID)= " & strQSMEID & "
Set oRS22 = Server.CreateObject ("ADODB.Recordset"
oRS22.Open SQL22, oConn22
oRS22.Resync
oRS22.MoveFirst
%>
<Form Action=24ProcAddEdit.asp Method=post Name=22AddEditMEPM>
<BR>
MEID   <Input Type="Text" Name="MEID" Value=" <%Response.Write oRS22("MEID"
Location   <Input Type="Text" Name="Location" Value=" <%Response.Write oRS22("Location"
Type   <Input Type="Text" Name="Type" Value=" <%Response.Write oRS22("Type"
Serial Number   <Input Type="Text" Name="SerialNumber" Value=" <%Response.Write oRS22("SerialNumber"
Model   <Input Type="Text" Name="Model" Value=" <%Response.Write oRS22("Model"
Specs   <Input Type="Text" Name="Specs" Value=" <%Response.Write oRS22("Specs"
Date MEID was entered   <Input Type="Text" Name="MEDate" Value=" <%Response.Write oRS22("MEDate"
<input type=submit value=Submit id=submit1 name=submit1>"
</Form>
</BODY>
</HTML>