Re: FlushDatabase Suggestion

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18062
interpreted = N
texte = >I think you have to quit WebStar & WebCat CGI, replace the db & relaunch.No you do not have to do this, WebCat can do it all itself.You will never have to worry about the old db getting reloaded if you use the following three tags in your update template as shown here. And because it only takes about 7 ticks to do all three tasks, the possibility of someone getting the Error, db not found message during this process is extremely rare:[deletefile path/to/old.db] [closedatabase path/to/old.db] [copyfile path=path/to/new.db&to=path/to/old.db] 1- The first tag deletes the old.db file, thus it *cannot* be reloaded. This does not stop WebCat from processing requests for the old.db data, because there's still a copy in the RAM cache.2- The second tag purges the data from the RAM cache. This stops WebCat from processing any more requests for old.db data until WebCat has reloaded it into RAM again. But you just trashed the old.db file in the previous step, so WebCat cannot even reload the old.db file again ...3- The third tag copies the new.db file to the place where the old.db was stored. Now WebCat can load the new.db file into RAM and start processing requests again, this time with the new data instead of the old data.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: FlushDatabase Suggestion (Pat McCormick 1998)
  2. Re: FlushDatabase Suggestion (Pat McCormick 1998)
  3. Re: FlushDatabase Suggestion (Pat McCormick 1998)
  4. Re: FlushDatabase Suggestion (Kenneth Grome 1998)
  5. Re: FlushDatabase Suggestion (bob 1998)
  6. Re: FlushDatabase Suggestion (bob 1998)
  7. Re: FlushDatabase Suggestion (bob 1998)
  8. Re: FlushDatabase Suggestion (Pat McCormick 1998)
  9. Re: FlushDatabase Suggestion (Pat McCormick 1998)
  10. Re: FlushDatabase Suggestion (Kenneth Grome 1998)
  11. Re: FlushDatabase Suggestion (Bob Minor 1998)
  12. Re: FlushDatabase Suggestion (Pat McCormick 1998)
  13. Re: FlushDatabase Suggestion (Bob Minor 1998)
  14. Re: FlushDatabase Suggestion (Pat McCormick 1998)
  15. Re: FlushDatabase Suggestion (Kenneth Grome 1998)
  16. Re: FlushDatabase Suggestion (Pat McCormick 1998)
  17. Re: FlushDatabase Suggestion (Kenneth Grome 1998)
  18. FlushDatabase Suggestion (Pat McCormick 1998)
>I think you have to quit WebStar & WebCat CGI, replace the db & relaunch.No you do not have to do this, WebCat can do it all itself.You will never have to worry about the old db getting reloaded if you use the following three tags in your update template as shown here. And because it only takes about 7 ticks to do all three tasks, the possibility of someone getting the Error, db not found message during this process is extremely rare:[deletefile path/to/old.db] [closedatabase path/to/old.db] [copyfile path=path/to/new.db&to=path/to/old.db] 1- The first tag deletes the old.db file, thus it *cannot* be reloaded. This does not stop WebCat from processing requests for the old.db data, because there's still a copy in the RAM cache.2- The second tag purges the data from the RAM cache. This stops WebCat from processing any more requests for old.db data until WebCat has reloaded it into RAM again. But you just trashed the old.db file in the previous step, so WebCat cannot even reload the old.db file again ...3- The third tag copies the new.db file to the place where the old.db was stored. Now WebCat can load the new.db file into RAM and start processing requests again, this time with the new data instead of the old data.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:

WebCatalog for Postcards ? (1997) Random sort is not random at all..... (2000) Inventory Control (2000) Searchable WebCat (etc.) Docs ? (1997) Summing fields (1997) summarizing date search by month... (2000) WCS Newbie question (1997) Setting up shop (1997) Emailer error 571 (1998) Date Bug (1998) HTML Editors (1997) Parsing args without ? (2003) Sending order notification by fax (1999) embedding [showcart] ??? (1998) searches with dash, period etc. (2000) Queertrons? (1997) Help name our technology! (1997) show all problem (1997) need help please (1997) WebCatalog 4.0.1b2 is now available (2000)