New command suggestion (was Re: Modifying databases manually)

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13827
interpreted = N
texte = At 4:49 PM 10/8/97, Kenneth Grome is rumored to have said: >>On occassion and I can't remember why I needed to >>do it and when I do it I flush the webcat template cache and that >>somethings fixes pages I am working on live that are acting strange and I >>know they should not. But I think 2.0and up is smarter than the older beta >>stuff, cause I can't remember doing this in a long time. > >The new WebCatalog checks the modification date and loads >newly-modified copies of its templates automatically, thus you should >no longer have to use the $FlushTemplates command. But flushing >*databases* is another story ... > >To be completely safe about changing your database files manually, >either quit the WebCat CGI, or if you're using the plugin quit >WebSTAR, until you're done modifying a database file manually. > >The second-safest method (which will usually work) is to modify a >*copy* of your database, then use the &FlushDatabases command >immediately before replacing the original with your newly-modified >copy. > >Sincerely, Ken GromeChanging out databases has become a problem for us, since we generally have 20 or more connections at any given time. I hate to deny users access to our site by quitting Webstar or Refusing Connections for ANY amount of time, so I have a proposal.A new command called $Reload with the argument db=file.db. This command would cause Webcat to throw away the database in RAM and reload the data from disk. Obviously, if this database is being modified, you would want to flush it before making any changes to the file. This would allow the user to perform the following sequence without shutting down Webstar or the CGI:1) $Flushdatabases (to write out any changes) 2) Load a template with an [Applescript] to rename file.db to file.db.old, file.db.new to file.db or manually copy the file in the Finder (meanwhile someone accesses the site and reopens the old database) 3) $Reload?db=file.db (dump file.db from RAM without writing to disk, load new file.db into RAM)Note that this only makes sense for databases that aren't being modified by webcat all the time (or at all). We have several databases that are only modified by Admin pages or by an external program (like Excel or 4D), and having a way to swap the database in without restarting Webstar would be a big help.We would still have to resort to a shutdown to change out webcat-modified database files to ensure consistency.What does everyone think? Or am I missing an easier way to do this?Thanks,-Dale--- Dale LaFountain | mailto:dalel@dhorse.com Director of MIS, WebMaster | http://www.dhorse.com/ Dark Horse Comics, Inc. |Phone: 503-652-8815 x324 Associated Messages, from the most recent to the oldest:

    
At 4:49 PM 10/8/97, Kenneth Grome is rumored to have said: >>On occassion and I can't remember why I needed to >>do it and when I do it I flush the webcat template cache and that >>somethings fixes pages I am working on live that are acting strange and I >>know they should not. But I think 2.0and up is smarter than the older beta >>stuff, cause I can't remember doing this in a long time. > >The new WebCatalog checks the modification date and loads >newly-modified copies of its templates automatically, thus you should >no longer have to use the $FlushTemplates command. But flushing >*databases* is another story ... > >To be completely safe about changing your database files manually, >either quit the WebCat CGI, or if you're using the plugin quit >WebSTAR, until you're done modifying a database file manually. > >The second-safest method (which will usually work) is to modify a >*copy* of your database, then use the &FlushDatabases command >immediately before replacing the original with your newly-modified >copy. > >Sincerely, Ken GromeChanging out databases has become a problem for us, since we generally have 20 or more connections at any given time. I hate to deny users access to our site by quitting Webstar or Refusing Connections for ANY amount of time, so I have a proposal.A new command called $Reload with the argument db=file.db. This command would cause Webcat to throw away the database in RAM and reload the data from disk. Obviously, if this database is being modified, you would want to flush it before making any changes to the file. This would allow the user to perform the following sequence without shutting down Webstar or the CGI:1) $Flushdatabases (to write out any changes) 2) Load a template with an [Applescript] to rename file.db to file.db.old, file.db.new to file.db or manually copy the file in the Finder (meanwhile someone accesses the site and reopens the old database) 3) $Reload?db=file.db (dump file.db from RAM without writing to disk, load new file.db into RAM)Note that this only makes sense for databases that aren't being modified by webcat all the time (or at all). We have several databases that are only modified by Admin pages or by an external program (like Excel or 4D), and having a way to swap the database in without restarting Webstar would be a big help.We would still have to resort to a shutdown to change out webcat-modified database files to ensure consistency.What does everyone think? Or am I missing an easier way to do this?Thanks,-Dale--- Dale LaFountain | mailto:dalel@dhorse.com Director of MIS, WebMaster | http://www.dhorse.com/ Dark Horse Comics, Inc. |Phone: 503-652-8815 x324 Dale LaFountain

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:

restarting service remotely on NT (1997) Timer Values on [redirect] (1998) Custom formulas.db (1998) Problems appending to database (1997) [WebDNA] Installation on windows 2008 server (2010) Searchable WebCat (etc.) Docs ? (1997) limitation found on group searching (1997) [WebDNA] WebDNA 7 (2011) price totals (2003) Forms (1997) Request for improvement... (2002) [WebDNA] [announce] MacWorld SF Jan. '09 (2008) Help formatting search results w/ table (1997) Searchable list mail via wwebcat (1998) Loss in Form (1998) PC Cookie Problem? (2003) Press Release hit the NewsWire!!! (1997) Claris HomePage messes up the code (1997) Emailer problem with WC 2.1, NT, WebSite 2.1 (1998) Date Sorting (1997)