Re: Updating a database once per day - An example
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 17980
interpreted = N
texte = >So, why not:>[closedatabase test.db]>[movefile path=spareFolder/test.db&to=test.db]>>I interpret [closedatabase] as a write-command (according to the manual).>So far I know file operations on the mac have absolute priority and nobody>should be able to read a file during a write-command. And immediately>follows [movefile], which is a write-command either in this case. So I>think there is no chance for a user to open the database again until the>two commands are finished. Is this wrong - is your code more secure?>>PeterI think Ken and everybody else is trying to prevent is that very remotechance the db get hit before the move is complete. Therefore the old db isre-loaded. If you delete it first, then close it there is nothing to writeto, so it skips the write and in the odd chance somebody tries to open thedb in the 7 ticks Ken talked about before the move is clomplete, they wouldget an error db not found.Maybe I am confused...but that is the way I understood what they tried toexplain. Please correct me if I am wrong.===============================================Gary Richter PanaVise Products, Inc. 7540 Colbert Dr. Reno, Nevada 89511 Ph: 702.850.2900 Fx: 702.850.2929 Email: grichter@panavise.com http://www.panavise.com===============================================
Associated Messages, from the most recent to the oldest:
>So, why not:>[closedatabase test.db]>[movefile path=spareFolder/test.db&to=test.db]>>I interpret
[closedatabase] as a write-command (according to the manual).>So far I know file operations on the mac have absolute priority and nobody>should be able to read a file during a write-command. And immediately>follows
[movefile], which is a write-command either in this case. So I>think there is no chance for a user to open the database again until the>two commands are finished. Is this wrong - is your code more secure?>>PeterI think Ken and everybody else is trying to prevent is that very remotechance the db get hit before the move is complete. Therefore the old db isre-loaded. If you delete it first, then close it there is nothing to writeto, so it skips the write and in the odd chance somebody tries to open thedb in the 7 ticks Ken talked about before the move is clomplete, they wouldget an error db not found.Maybe I am confused...but that is the way I understood what they tried toexplain. Please correct me if I am wrong.===============================================Gary Richter PanaVise Products, Inc. 7540 Colbert Dr. Reno, Nevada 89511 Ph: 702.850.2900 Fx: 702.850.2929 Email: grichter@panavise.com http://www.panavise.com===============================================
Gary Richter
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:
[ShowIf] if the varieable exists (1998)
Download (1999)
Need relative path explanation (1997)
SiteGaurd file Cache vs webcatalog cache (1997)
[AppendFile] problem (WebCat2b13 Mac .acgi) (1997)
Add to Cart & List of Products (1997)
creating a ShipCosts database (1997)
Re:quit command on NT (1997)
SiteEdit Pro Update Announcement (1997)
[isfile] ? (1997)
Frames and WebCat (1997)
[addlineitems] (1997)
Paranoid about serial numbers...not (1998)
problems with 2 tags (1997)
REPOST: How do _you_ back up your db? (2000)
Problems with ^ could be solved with [REPLACE CHARACTERS] (1997)
[OT] CSS and SSI books (2004)
(1997)
[OT] HTML render (2003)
Pre-parse hell (2008)