|
 |
asp_databases thread: Accessing updated record after performing an update query
Message #1 by constancebeckett@h... on Mon, 24 Jun 2002 19:55:55
|
|
Hi
I'm trying to access a record after performing an update on the record.
I take values from a form, I post the form, I update the record using an
update query and then in the same ASP page I open a recordset to access
the updated record. The problem is that the ASP page does not display the
updated data until it is refreshed. When I check the database the record
has successfully updated so why does the page not relect the change? I
don't open the display recordset until after performing the update.
Thanks
Connie
Message #2 by "Ken Schaefer" <ken@a...> on Tue, 25 Jun 2002 15:31:06 +1000
|
|
The browser is probably loading a cached version of the page. Are you
setting requisite expiry and caching headers?
<%
Sub SetHeaders( _
)
Response.ExpiresAbsolute = #1/1/1980#
Response.CacheControl = "no-cache, must-revalidate, private"
Response.AddHeader "pragma", "no-cache"
' Optionally also add the ETag header with a random, unique value
Response.AddHeader "ETag", Server.URLEncode(Now())
End Sub
%>
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <constancebeckett@h...>
Subject: [asp_databases] Accessing updated record after performing an update
query
: Hi
: I'm trying to access a record after performing an update on the record.
: I take values from a form, I post the form, I update the record using an
: update query and then in the same ASP page I open a recordset to access
: the updated record. The problem is that the ASP page does not display the
: updated data until it is refreshed. When I check the database the record
: has successfully updated so why does the page not relect the change? I
: don't open the display recordset until after performing the update.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |