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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp resultset cached?

Status
Not open for further replies.

russland

Programmer
Jan 9, 2003
315
CH
hi,
i loop through a list of records and within that loop recursively i call the same function again (to loop children-data of the parent record). now, for some reason it does not return the max(id) respectively the correct @@IDENTITY key. it somehow seems that the resultset caches it's information. and displays the result from the old query again and again. really strange. any clue how i could ensure the no cache is used?
 
This code makes sure there is no cached information:

Code:
Response.Buffer = true;
Response.ExpiresAbsolute = "January 1, 1980";
Response.Expires = -1;  //This is kinda beating a dead horse
Response.CacheControl = "no-cache";

To be honest, I don't think the code snipped I supplied will solve your problem.

Sounds like you need to pass something in your function that is always changing (i.e. a timestamp). That will force your function to use the up to date data. Simply add another parameter onto your function that is just the current time, that should solve your problem.



[monkey][snake] <.
 
thanks monksnake. that's what i have already in my pages. But u r right. this is page control and not resultset-cache control. I might upgrade to a newer version of msaccess. probably it's due to that.

anyway. thanks a lot for you effort and hint.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top