Re: CloseDataBase vs CommitDataBase
This WebDNA talk-list message is from 2007
It keeps the original formatting.
numero = 68839
interpreted = N
texte = Dennis J. Bonsall, Jr. wrote:>> I want to add either>> CLOSEDATABASE or COMMITDATABASE>> to my append page.>>>> The docs sorta contradict on using these.>> Is there a good rule of thumb when using either?>>>> Like "before" an append or "after" an append?>>>> One tag better than the other?> > Typically, you should not need to use either of these. In the WebDNA > preferences, there is an option to automatically commit changes to the > database anytime the database has been modified. However, my experience > is that it does not necessarily work as advertised. This may have been > fixed in later versions, but in the version I am using (version 4.5.1), > I often have the same database get opened more than once. I use > [closedatabase] (with an absolute path from the server's root specified) > to get around this issue. I close all instances of the database which > makes sure that when the database is reloaded the updated info is > available.I would suspect that closedatabases could cause more of aperformance hit (in performance intense situations) than commitdatabases.My reasoning is because commitdatabase is not taking the .db out of RAM.I use [commitdatabase..] *after* ever append/replace/delete out of habbit.> As for using these tags before or after an append, I guess it would > depend on exact circumstances. If not all info was being recorded to > the database from a prior entry which results in WebDNA not being able > to verify whether an ID exists before it uses it, you might want to try > committing the database before the append (and actually before the > routine that checks to see if the ID is already in use). If the record > is not being committed to the database immediately on a change, you > could use the [commitdatabase] after the append.Basically, if you use a [commitdatabase..] after an append/replace/delete,you will always be pulling> > As for [closedatabase], there shouldn't be much use for it, unless you > have issues with the same database being opened multiple times, like I > do. You can check your list of open databases to see if that is the > case. In my case, each instance has a different path (one instance has > an exact path, while one has a virtual path), but they are the same > database.> > What are you using to generate your unique ID's? [cart] makes a perfect > unique ID generator.> > DennisI suspect Lester's problem is not to do with commit or close databases.Lester, post your code.You can use [exclusivelock...] in situations where you want to be sureyour .db is only being accessed by on editor.Donovan-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Desktop Publishing, Print Consulting, Labels -> <-Glass Products, off-hand Classes/studio rental-> PH:> (608) 835-2476 | Forum:> http://egg.bz/forum/ Web Sites:> http://www.euca.us & http://www.egg.bz =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Dennis J. Bonsall, Jr. wrote:>> I want to add either>> CLOSEDATABASE or COMMITDATABASE>> to my append page.>>>> The docs sorta contradict on using these.>> Is there a good rule of thumb when using either?>>>> Like "before" an append or "after" an append?>>>> One tag better than the other?> > Typically, you should not need to use either of these. In the WebDNA > preferences, there is an option to automatically commit changes to the > database anytime the database has been modified. However, my experience > is that it does not necessarily work as advertised. This may have been > fixed in later versions, but in the version I am using (version 4.5.1), > I often have the same database get opened more than once. I use > [closedatabase] (with an absolute path from the server's root specified) > to get around this issue. I close all instances of the database which > makes sure that when the database is reloaded the updated info is > available.I would suspect that closedatabases could cause more of aperformance hit (in performance intense situations) than commitdatabases.My reasoning is because commitdatabase is not taking the .db out of RAM.I use [commitdatabase..] *after* ever append/replace/delete out of habbit.> As for using these tags before or after an append, I guess it would > depend on exact circumstances. If not all info was being recorded to > the database from a prior entry which results in WebDNA not being able > to verify whether an ID exists before it uses it, you might want to try > committing the database before the append (and actually before the > routine that checks to see if the ID is already in use). If the record > is not being committed to the database immediately on a change, you > could use the [commitdatabase] after the append.Basically, if you use a [commitdatabase..] after an append/replace/delete,you will always be pulling> > As for [closedatabase], there shouldn't be much use for it, unless you > have issues with the same database being opened multiple times, like I > do. You can check your list of open databases to see if that is the > case. In my case, each instance has a different path (one instance has > an exact path, while one has a virtual path), but they are the same > database.> > What are you using to generate your unique ID's? [cart] makes a perfect > unique ID generator.> > DennisI suspect Lester's problem is not to do with commit or close databases.Lester, post your code.You can use [exclusivelock...] in situations where you want to be sureyour .db is only being accessed by on editor.Donovan-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Desktop Publishing, Print Consulting, Labels -> <-Glass Products, off-hand Classes/studio rental-> PH:> (608) 835-2476 | Forum:> http://egg.bz/forum/ Web Sites:> http://www.euca.us & http://www.egg.bz =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Donovan Brooke
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)
Re:PCS Customer submissions ? (1997)
Can't get appendfile to work (1997)
[OT] Display Glitch (2004)
WebCatalog 2.0 b 15 mac (1997)
unable to launch acgi in WebCat (1997)
[WebDNA] Anyone using CODA ?? (2012)
Prevent multiple appends with Reload Button (1997)
[group] ? (1997)
[WebDNA] jumpstart me? - how to auto-upload to a remote server? (2010)
RE: Web*SSL and WebCatalog (1997)
Secure server question (1997)
Banners (1997)
Can I invoke an ssi plugin from within a webcat page (1997)
Summing fields (1997)
Associative lookup style? (1997)
Cookies and webcat (1997)
Database Structuring (again) (2003)
Plugin or CGI or both (1997)
Webcatalog/Butler (1998)