Forums

ASP

This topic is locked

Page must be refreshed to reflect the update

Posted 01 Mar 2003 17:22:56
1
has voted
01 Mar 2003 17:22:56 Bob Cochrane posted:
The update cmd updates the record correctly but the 'Form for update' does not always reflect the change.

Replies

Replied 01 Mar 2003 18:58:23
01 Mar 2003 18:58:23 Jørgen Emerslund replied:
Not sure if I understood your problem correctly, but would this help?

<%
Response.Redirect( Request.ServerVariables("SCRIPT_NAME" )
%>
Replied 01 Mar 2003 19:12:06
01 Mar 2003 19:12:06 Bob Cochrane replied:
I have tried redirecting. It helps about 80% of the time. The "Form for Update" script which creates the record set comes after cmdUpdate.Execute command both are using the same 'ActiveConnection' . I have tried using a different ActiveConnection but problem persists.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Not sure if I understood your problem correctly, but would this help?

&lt;%
Response.Redirect( Request.ServerVariables("SCRIPT_NAME" )
%&gt;
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 01 Mar 2003 22:55:55
01 Mar 2003 22:55:55 asp asp replied:
just put this on the top of your page, below the &lt;%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%&gt;


&lt;%Response.CacheControl="no-store"%&gt;
Replied 02 Mar 2003 04:42:56
02 Mar 2003 04:42:56 Bob Cochrane replied:
I added &lt;%Response.CacheControl="no-store"%&gt; as suggested but problem persists. I tried using the method 'REQUERY' on the "update" recordset but the old record is still displayed while the record in the db shows that the record has been updated.
Replied 02 Mar 2003 06:59:24
02 Mar 2003 06:59:24 asp asp replied:
try redirecting to this page with the previous script i mentioned on the main page

&lt;%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;/head&gt;
&lt;% Response.write("&lt;script language='javaScript'&gt;" & vbCrLf) %&gt;
&lt;% Response.write("history.go(-2)" & vbCrLf) %&gt;
&lt;% Response.write("&lt;/script&gt;" %&gt;



&lt;body bgcolor="#000000"&gt;
&lt;/body&gt;
&lt;/html&gt;

Reply to this topic