CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 How to force a requery from db

Print topic Send  topic

Author Message
csierra

Posts: 123
Posted: 11/11/2010, 2:43 AM

Hi all, I have a query to throw top 10 random records, to show on my front page; althought each time I run the query from the db I get different records (this is, the randomize is working fine at the db end) when connection this query as a grid datasourse I get the very same each time; I supposed it was a chache issue, so that is why I included

   
Response.CacheControl="public"  
Response.AddHeader "Pragma", "public"  
response.Buffer=false  
response.expires=-1  

But still no joy; does not work; I am wondering how to force a requery; lets say on the beforeshow event, create an adodb.recordset and push it to the grid; how to? any ideas are welcome!

Thanks

_________________
Yes! I Can!!!
View profile  Send private message
Edd


Posts: 547
Posted: 11/11/2010, 3:58 AM

This will not work all the time. IIS has to be set not to cache the site and even then, in my experience it is not 100%.

To stop caching try https instead of http - that is why a lot of sites use secure pages, they are not allowed to cache.

Good luck.
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
TheunisP

Posts: 340
Posted: 11/15/2010, 6:27 PM

this is 99.9% chance of being a browser issue - you are seeing a cached page

in IE:

Tools > Internet Options > Browsing History button [Settings]
then make sure that for Check for newer versions - Every time I visit the webpage is selected

FF must have something similiar but cant remember it now

View profile  Send private message
csierra

Posts: 123
Posted: 11/15/2010, 6:38 PM

Thanks but is not the case; I have Firefox 3.6 and IE 8, same thing.

Thanks for your reply!
_________________
Yes! I Can!!!
View profile  Send private message
TheunisP

Posts: 340
Posted: 11/15/2010, 6:56 PM

ok - let's see we know it is being cached somewhere, to try and save bandwidth perhaps - can it be something on the client PC or I suppose whoever your DSL connection provider is can also do a bit of caching to save them retrieving the file again

grabbing from some of my older projects I have:

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

and then this from MS: ;-) scary

http://support.microsoft.com/kb/222064/

ps. you are not using CCS caching? ;-)
View profile  Send private message
lboeldt

Posts: 53
Posted: 11/15/2010, 8:07 PM

One thing you can try is setting a query string parameter to the value of timer and placing that in your refresh link. That way each time the link is pressed a new page will be forced to generate. When combined with all of the "do not cache" headers this should give you what you a way to always get new content on the page.

View profile  Send private message
TheunisP

Posts: 340
Posted: 11/15/2010, 11:36 PM

thought the same thing - but this is is his homepage you don't have control over the link - unless you do a pass through go for say index.asp and then pass it on with a random number to a receiving page which is now your homepage

hacking it like this might not be the best, I'd rather find out who, what & why is doing it


View profile  Send private message
lboeldt

Posts: 53
Posted: 11/16/2010, 4:42 AM

You're right its not the best approach for a home page as it will generate lots of extra crawler traffic. What about using an AJAX callback to pull a new piece of content each time. Start the page with an embedded content table surrounded by a div with an ID that you assign then use an AJAX periodical updater (ala prototype.js) to grab a new version of the table at a specified interval.
View profile  Send private message
TheunisP

Posts: 340
Posted: 11/17/2010, 11:03 AM

cam you post the url perhaps
View profile  Send private message
csierra

Posts: 123
Posted: 11/17/2010, 4:36 PM

Thanks for your replies; the URL is http://huatulcosecreto.com where you can see at the right column a grid; this is the mentioned one. mean while I am trying the ' <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> ' tag, Ill let you know. No ccs caching; no IPS issue Ive used a couple (diff) ones.

Thanks Ill keep you all updated!


_________________
Yes! I Can!!!
View profile  Send private message
TheunisP

Posts: 340
Posted: 11/17/2010, 4:56 PM

ok so in theory that list "Hoy en el KB de Ventas" should change each time I reload?
View profile  Send private message
csierra

Posts: 123
Posted: 11/18/2010, 5:06 PM

Thanks ThenuisP, yes, that is what should change with every hit to the homepage. Still no joy here...
_________________
Yes! I Can!!!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.