Re: FlushDatabase Suggestion

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18043
interpreted = N
texte = I think you would need to have. new tag - [lock db=yourdb.db] locks a database keeping it from being read/written to/from disk until machine is restarted or until it recieves a [load db] command. Closedatabase nor flushdatase commands could not override this setting.[copyfile path=new/yourdb.db&to=yourdb.db]newtag [load db=yourdb.db]Barring this it would be very difficult for someone to beat your copyfile command, if you wanted to be sure your could do the following. With this scheme you backup your file before you remove and replace it. Then you close the database removing it from ram. After which you delete the file, preventing anyone from reloading it. It would be tough to beat the time between the closedatabase command and the deletefile command. This scenario would best meet the strictest available conditions, however if you crashed at the deletefile and before the copyfile you would not have access to the yourdb.db file and would have to retrieve it from the backup folder in order to get it going again. This is somewhat retentive but it does take into account all of your possible concerns.[copyfile path=yourdb.db&to=backup/archive.db](just for protection) [closedatabase path/to/some.db] [deletefile path=yourdb.db] [copyfile path=path/to/some.db&to=../somefolder/archive.db]Pat McCormick wrote:> Kenneth Grome wrote: > > > [closedatabase path/to/some.db] > > [copyfile path=path/to/some.db&to=../somefolder/archive.db] > > > > And yes, the [copyfile] tag *does* create the archive file if it didn't exist -- but the [closedatabase] tag does not, and that's why these two tags must be used together in order to achieve the results you asked for ... :) > > Ken, > > I have two folders: new & current, each containing a respective copy of a > catalog database. I want an URL which will dump the current, RAM database, > load the new one from the new directory, then save it to the current > directory, and make all subesequent accesses to the currect db. > > Will you solution achieve this - even if hits arrive during the close and copy process? > > -Pat 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 would need to have. new tag - [lock db=yourdb.db] locks a database keeping it from being read/written to/from disk until machine is restarted or until it recieves a [load db] command. Closedatabase nor flushdatase commands could not override this setting.[copyfile path=new/yourdb.db&to=yourdb.db]newtag [load db=yourdb.db]Barring this it would be very difficult for someone to beat your copyfile command, if you wanted to be sure your could do the following. With this scheme you backup your file before you remove and replace it. Then you close the database removing it from ram. After which you delete the file, preventing anyone from reloading it. It would be tough to beat the time between the closedatabase command and the deletefile command. This scenario would best meet the strictest available conditions, however if you crashed at the deletefile and before the copyfile you would not have access to the yourdb.db file and would have to retrieve it from the backup folder in order to get it going again. This is somewhat retentive but it does take into account all of your possible concerns.[copyfile path=yourdb.db&to=backup/archive.db](just for protection) [closedatabase path/to/some.db] [deletefile path=yourdb.db] [copyfile path=path/to/some.db&to=../somefolder/archive.db]Pat McCormick wrote:> Kenneth Grome wrote: > > > [closedatabase path/to/some.db] > > [copyfile path=path/to/some.db&to=../somefolder/archive.db] > > > > And yes, the [copyfile] tag *does* create the archive file if it didn't exist -- but the [closedatabase] tag does not, and that's why these two tags must be used together in order to achieve the results you asked for ... :) > > Ken, > > I have two folders: new & current, each containing a respective copy of a > catalog database. I want an URL which will dump the current, RAM database, > load the new one from the new directory, then save it to the current > directory, and make all subesequent accesses to the currect db. > > Will you solution achieve this - even if hits arrive during the close and copy process? > > -Pat Bob Minor

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:

WebCat for mass emailings (1997) Monthly Help File (2000) I'm having trouble using [url][interpret][math] together in lookup (1997) Username for Admin Group (1997) Date sorting (1997) searching multiple databases in single search (1997) Adding a product from another site (1997) Credit card types (1997) check out page (SSL) *still* not loading on Netscape 4.0+ (1999) Re:Emailer and encryption (1997) Pager notification of completed orders (1998) Replace context problem ... (1997) (1997) Speed Optimization - Mac (1997) OT - Mail Solution (2002) WebCat2: multiple currency support (1997) Add a field to the error log? (1997) WebDNA Developer Resource Center (2002) Help!!!! (1997) Log-in Scheme (2003)