Link to home
Start Free TrialLog in
Avatar of sglee
sglee

asked on

CFQuery with cachedWithin="#CreateTimeSpan(0,1,0,0)#"

Hi,
  I have the following code in CFM page.

<CFQUERY NAME="GetCustomers" datasource="DSN" cachedWithin="#CreateTimeSpan(0,1,0,0)#">
      SELECT      *
         FROM         Customers
      ORDER BY CustomerName
</CFQUERY>

 What does cachedWithin="#CreateTimeSpan(0,1,0,0)# mean?
 The reason for asking is:

 I just added a new customer to  the CUSTOMER table in ACCESS. But that new customer does not show up in online  Order Form when the user selects the customer from the customer drop-down menu.
 And I suspect that it has something to do with cashedwithin statement.
 How can I make it so that when I add a new customer or new part into the tables, they would show up in drop down menu on the webpage?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of erikTsomik
erikTsomik
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sglee
sglee

ASKER

That is what I suspected. If I replace 1 with 0, what happens then?
cachedWithin="#CreateTimeSpan(0,0,0,0)#"
Avatar of sglee

ASKER

What if I don't want any data cached?
What if I just want the query to be executed whenever online order form is displayed?
SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sglee

ASKER

Thanks for the information.
I will simply remove cachedWithin="#CreateTimeSpan(0,1,0,0)#  from CFQuery all together from now on.
As to the SELECT *, thanks for the additional information and I appreciate it.