Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

refreshing

Status
Not open for further replies.

JohannIcon

Programmer
Sep 3, 2002
440
MT
Hi All

I am updating a recordset from a database. I am doing the usual update statement and in this asp I am also showing the existing entries in the database. When I do the update, I am redirecting to the same page with the submit button and displaying a message if the item was updated or not. However the exisitng entries in the database is not refreshing, and displaying the old items (before doing the update). How can I refresh this recordset or else refresh the page so that the changes are shown on the screen to the user?

Thanks for your help.
 
Add the following att the top of your page to avoid caching :
Code:
<%	Response.AddHeader &quot;Pragma&quot;, &quot;no-cache&quot; %>
<%	Response.CacheControl = &quot;no-cache&quot; %>
<%	Response.Expires = -1 %>
Water is not bad as long as it stays out human body ;-)
 
I tried it, still the same problem, but if i refresh the page manually, it works
 
Check caching properties of your http server. Other way is to limit &quot;temporary internet files&quot; folder size in the properties of IE and force the browser to check every time a page is loaded if a newer version exists but may be this way can't be done for all client browsers. Water is not bad as long as it stays out human body ;-)
 
How can I check these properties?

Thanks for your help
 
I am not a IIS specialist. I had to install websites in it once or twice but won't be abble to answer this. Try the IIS FAQ or forum, I think you should get quickly your answer. Water is not bad as long as it stays out human body ;-)
 
Its telling me object does not support this property or method:-

<select name=&quot;FilterSupport&quot; id=&quot;mySelect&quot;>
<%
Dim RSModifySupport

Set RSModifySupport = Server.CreateObject (&quot;ADODB.Recordset&quot;)
RSModifySupport.ActiveConnection = cnn

RSModifySupport.Open (&quot;SELECT * FROM Support ORDER BY supportName ASC&quot;)

if NOT RSModifySupport.EOF or NOT RSModifySupport.BOF then

Response.Write (&quot;<OPTION SELECTED VALUE=&quot;&quot;0&quot;&quot;></OPTION>&quot;)

RSModifySupport.MoveFirst
While Not RSModifySupport.Eof

Response.Write (&quot;<OPTION VALUE=&quot;&quot;&quot; & RSModifySupport.Fields(&quot;supportID&quot;) & &quot;&quot;&quot;>&quot; & (RSModifySupport.Fields(&quot;supportName&quot;)) & &quot;</OPTION>&quot;)

RSModifySupport.MoveNext

Wend
end if
%>
</select>

//check to see if support update Text is empty
var oSel = document.getElementById(&quot;mySelect&quot;);
if (oSel.selectedIndex==0)
{
alert(&quot;Please Choose a package!!&quot;)
calform.FilterSupport.focus()
calform.FilterSupport.select()
return false
}
 
First, you posted it in the wrong thread, it's a luck I've read the two of them. the good one is : thread333-411449
Second, Did you write the code as displayed here ? with no &quot;<script>&quot; tags, out any function ? Water is not bad as long as it stays out human body ;-)
 
No it does have <script></script> tags, I just eliminated them
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top