Re: FlushDatabase Suggestion
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 18081
interpreted = N
texte = >> Kenneth Grome wrote:>>> [deletefile path/to/old.db]>> [closedatabase path/to/old.db]>> [copyfile path=path/to/new.db&to=path/to/old.db]>>The deletefile doesn't do anything here because of the closedatabase.Yes it does, it moves the old.db file out of the folder it's sitting in -- so it doesn't get reloaded after the [closedatabase] tag and before the [copyfile] tag.If you don't want to delete the current db file, for example if you prefer to archive it instead, do this:[movefile path=path/to/old.db&to=path/to/archiveFolder/old.db[date]][closedatabase path/to/old.db][copyfile path=path/to/new.db&to=path/to/old.db]In my first example I used the [deletefile] tag to demonstrate *one way* to get the old.db file out of the folder it was sitting in. But of course you can move it out of that folder just as effectively by using the [movefile] tag as shown in my second example ...Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
>> Kenneth Grome wrote:>>> [deletefile path/to/old.db]>> [closedatabase path/to/old.db]>> [copyfile path=path/to/new.db&to=path/to/old.db]>>The deletefile doesn't do anything here because of the closedatabase.Yes it does, it moves the old.db file out of the folder it's sitting in -- so it doesn't get reloaded after the
[closedatabase] tag and before the
[copyfile] tag.If you don't want to delete the current db file, for example if you prefer to archive it instead, do this:[movefile path=path/to/old.db&to=path/to/archiveFolder/old.db
[date]][closedatabase path/to/old.db][copyfile path=path/to/new.db&to=path/to/old.db]In my first example I used the
[deletefile] tag to demonstrate *one way* to get the old.db file out of the folder it was sitting in. But of course you can move it out of that folder just as effectively by using the
[movefile] tag as shown in my second example ...Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://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:
Changes to [ReturnRaw] in 3.0 (1998)
Logging purchases (1997)
email [title] (1997)
I can help! (1996)
WCS Newbie question (1997)
WC1.6 to WC2 date formatting (1997)
[Webcat 2]Next (1997)
This list needs a digest: rant, rave... (1997)
WC2b15 File Corruption (1997)
Payment Processors (2005)
[OT] Xserve (2002)
Blank orders after update to 5.1 (2003)
Regarding PayPal (was Payments -> Bank Accounts) (2005)
Re:2nd WebCatalog2 Feature Request (1996)
BCC Limits (2003)
shrink-wrapped version out yet? (1997)
Dieresis in [sendmail] (1999)
Accepting credit cards (1997)
[date format] w/in sendmail (1997)
Emailer setup (1997)