Re: CloseDataBase vs CommitDataBase

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68836
interpreted = N
texte = > 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. 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. 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. Dennis ------------------------------------------------------------- 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:

    
  1. Re: CloseDataBase vs CommitDataBase ( Terry Wilson 2007)
  2. Re: CloseDataBase vs CommitDataBase ( thierry 2007)
  3. Re: CloseDataBase vs CommitDataBase ( Donovan Brooke 2007)
  4. Re: CloseDataBase vs CommitDataBase ( "Dennis J. Bonsall, Jr." 2007)
  5. Re: CloseDataBase vs CommitDataBase ( "Dennis J. Bonsall, Jr." 2007)
  6. Re: CloseDataBase vs CommitDataBase ( Lester 2007)
  7. Re: CloseDataBase vs CommitDataBase ( Donovan Brooke 2007)
  8. Re: CloseDataBase vs CommitDataBase ( "Dennis J. Bonsall, Jr." 2007)
  9. Re: CloseDataBase vs CommitDataBase ( Donovan Brooke 2007)
  10. Re: CloseDataBase vs CommitDataBase ( Donovan Brooke 2007)
  11. Re: CloseDataBase vs CommitDataBase ( "Dennis J. Bonsall, Jr." 2007)
  12. Re: CloseDataBase vs CommitDataBase ( Lester 2007)
  13. Re: CloseDataBase vs CommitDataBase ( "Dennis J. Bonsall, Jr." 2007)
  14. CloseDataBase vs CommitDataBase ( Lester 2007)
> 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. 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. 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. Dennis ------------------------------------------------------------- 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/ "Dennis J. Bonsall, Jr."

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:

Large sites (2003) AAgghh!! Help, please. SSL strikes again. (1997) Deleting Orders (1998) [BULK] RE: [WebDNA] [BULK] Web Merchant Authorize net issues (2011) Sv: Search problems! (1999) PCS Emailer's role ? (1997) label?! (2005) WCS Newbie question (1997) Still ignoring the 3.x bugs? (2000) Almost a there but..bye bye NetCloak (1997) quantity minimum problem (1997) Bad URL reference? (1997) multi-paragraph fields (1997) Include Troubles (1998) can WC render sites out? (1997) Large founditems loops (2000) Setting up shop (1997) credit card authorization question (1997) ShowNext for method=POST (1997) problem: search crashes webstar (1997)