Re: Updating a database once per day - An example

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17964
interpreted = N
texte = >Here's an example of how I implemented a solution for making sure that >Webcatalog is using the most recent copy of mydatabase.db: > >Rather than issuing an Applescript to tell Webcatalog to close databases at >a certain time each day, I generated some WEBDNA that will close a specific >database the first time it is needed after 3:10am. > >Here's the code: > > >[SHOWIF [LOOKUP >DB=flush.db&value=[url][date][/url]&lookinfield=DATE1&returnfield=TIME1¬found >=NOT_FOUND]=NOT_FOUND] > >[SHOWIF [time %H]>2] >[SHOWIF [time %M]>9] >[CLOSEDATABASE ../mydatabase.db] >[CLOSEDATABASE FLUSH.DB] >[APPEND flush.db]DATE1=[URL][date][/URL]&TIME1=[URL][TIME][/URL][/APPEND] >[/SHOWIF][/SHOWIF][/SHOWIF] > >--------------------- >flush.db: > >DATE1 TIME1 >05/28/1998 14:48:50 >05/29/1998 07:18:43 > >---------------------- >I welcome all questions and suggestions. Hi Steve,I din't understand what you're trying to accomplish here. Your code closes the mydatabase.db file, but it doesn't change anything in that db,and it doesn;t replace that file with another file. You never have to close the db just to make sure WebCat's using the most recent data, because the most recent data is always in RAM -- unless you're thinking about manually replacing that file with another more recent one. Is that what you're trying to accomplish here? Sorry I don't understand ...Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: Updating a database once per day - An example ( 1998)
  2. Re: Updating a database once per day - An example (bob 1998)
  3. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  4. Re: Updating a database once per day - An example (Steve Rosenbaum 1998)
  5. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  6. Re: Updating a database once per day - An example (Marty Schmid 1998)
  7. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  8. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  9. Re: Updating a database once per day - An example (Gary Richter 1998)
  10. Re: Updating a database once per day - An example (Peter Ostry 1998)
  11. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  12. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  13. Re: Updating a database once per day - An example (Rob Marquardt 1998)
  14. Re: Updating a database once per day - An example (Peter Ostry 1998)
  15. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  16. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  17. Re: Updating a database once per day - An example (Rob Marquardt 1998)
  18. Re: Updating a database once per day - An example (Rob Marquardt 1998)
  19. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  20. Re: Updating a database once per day - An example (Steve Rosenbaum 1998)
  21. Re: Updating a database once per day - An example (Kenneth Grome 1998)
  22. Updating a database once per day - An example (Steve Rosenbaum 1998)
>Here's an example of how I implemented a solution for making sure that >Webcatalog is using the most recent copy of mydatabase.db: > >Rather than issuing an Applescript to tell Webcatalog to close databases at >a certain time each day, I generated some WEBDNA that will close a specific >database the first time it is needed after 3:10am. > >Here's the code: > > >[SHOWIF [LOOKUP >DB=flush.db&value=[url][date][/url]&lookinfield=DATE1&returnfield=TIME1¬found >=NOT_FOUND]=NOT_FOUND] > >[SHOWIF [time %H]>2] >[SHOWIF [time %M]>9] >[CLOSEDATABASE ../mydatabase.db] >[CLOSEDATABASE FLUSH.DB] >[APPEND flush.db]DATE1=[url][date][/URL]&TIME1=[url][time][/URL][/APPEND] >[/SHOWIF][/SHOWIF][/SHOWIF] > >--------------------- >flush.db: > >DATE1 TIME1 >05/28/1998 14:48:50 >05/29/1998 07:18:43 > >---------------------- >I welcome all questions and suggestions. Hi Steve,I din't understand what you're trying to accomplish here. Your code closes the mydatabase.db file, but it doesn't change anything in that db,and it doesn;t replace that file with another file. You never have to close the db just to make sure WebCat's using the most recent data, because the most recent data is always in RAM -- unless you're thinking about manually replacing that file with another more recent one. Is that what you're trying to accomplish here? Sorry I don't understand ...Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[WebDNA] Forum Module Made In WebDNA (2020) [WebDNA] how to override webdna's built-in tags? (2010) New [If] command question (2000) ShowNext - HELP! (2000) Multiple catalog databases and showcart (1997) WebCat b15 Mac plug-in (1997) Cart Numbers (1997) info (1997) dates and hex formatting (1997) RE: HTTP Header info (1997) Replace Missing Images (2003) WebCat2.0 [format thousands .0f] no go (1997) Addlineitems ... grrr (2004) WebDNA for Dummies (2004) Multiple Pulldowns/Gary (1997) Weird bug, or is there something amiss? (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Generating unique SKU from [cart] - Still Stumped... (1997) searchable list archive (1997) Database of Tax Rates? (1997)