Re: CloseDataBase vs CommitDataBase

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68846
interpreted = N
texte = Lester wrote: > Using the "back" buton.... > That may be the problem. > > I'm generating the uniqueID as a hidden field when > they enter the "blog entry" page. (or the "make a > comment" page) > > Even though I have navigation links top, side, bottom > to let them make a new entry after they've just > submitted one, I'm willing to bet a very few just hit > the "back" button until they get to the create a blog > page again..... > > That would probably explain why the same ID is being > used. I'll add a direct link on the "blog submitted" > page to make available another way to create a new > entry. That should hopefully stop the "back" button > use.... > > > Would this be safer? > To make the ID at the append stage.... > > [append ^/hb/blogs.db]BlogID=[Date %Y%m%d%H%M%S]&etc > etc etc [/append] > > I'm thinking it would.... > > > Thanks Yes, however, if you use a redirect after your append.. you will get rid of caching problems anyway.. However, I think its always best to generate the unique ID right above the append statement. And Dennis, yea, the autonumber works fine. However, it can have issues in a relational type of system. These days, I almost always use the globals directory to generate a global ID (from "globalID.db"). This creates a unique ID sandbox wide (or server wide if there are no sandboxes). GlobalID.db--- ID -------------- Then do something like: [append db=^globalid.db&Autonumber=ID][/append] [commitdatabase db=^globalid.db] [append db=some.db]ID=[lastautonumber]..[/append] [commitdatabase db=some.db] In my sandboxes, I use similar code as above in a function within a preparse script so it is easier to call. [function name=GLOBAL_ID] [exclusivelock db=^globalid.db] [append db=^globalid.db&AUTONUMBER=ID][/append] [commitdatabase db=^globalid.db] [/exclusivelock] [/function] Then simply use it anywhere in the sandbox like so: [GLOBAL_ID] [append db=some.db]ID=[lastautonumber]..[/append] [commitdatabase db=some.db] 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:

    
  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)
Lester wrote: > Using the "back" buton.... > That may be the problem. > > I'm generating the uniqueID as a hidden field when > they enter the "blog entry" page. (or the "make a > comment" page) > > Even though I have navigation links top, side, bottom > to let them make a new entry after they've just > submitted one, I'm willing to bet a very few just hit > the "back" button until they get to the create a blog > page again..... > > That would probably explain why the same ID is being > used. I'll add a direct link on the "blog submitted" > page to make available another way to create a new > entry. That should hopefully stop the "back" button > use.... > > > Would this be safer? > To make the ID at the append stage.... > > [append ^/hb/blogs.db]BlogID=[Date %Y%m%d%H%M%S]&etc > etc etc [/append] > > I'm thinking it would.... > > > Thanks Yes, however, if you use a redirect after your append.. you will get rid of caching problems anyway.. However, I think its always best to generate the unique ID right above the append statement. And Dennis, yea, the autonumber works fine. However, it can have issues in a relational type of system. These days, I almost always use the globals directory to generate a global ID (from "globalID.db"). This creates a unique ID sandbox wide (or server wide if there are no sandboxes). GlobalID.db--- ID -------------- Then do something like: [append db=^globalid.db&Autonumber=ID][/append] [commitdatabase db=^globalid.db] [append db=some.db]ID=[lastautonumber]..[/append] [commitdatabase db=some.db] In my sandboxes, I use similar code as above in a function within a preparse script so it is easier to call. [function name=GLOBAL_ID] [exclusivelock db=^globalid.db] [append db=^globalid.db&AUTONUMBER=ID][/append] [commitdatabase db=^globalid.db] [/exclusivelock] [/function] Then simply use it anywhere in the sandbox like so: [GLOBAL_ID] [append db=some.db]ID=[lastautonumber]..[/append] [commitdatabase db=some.db] 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:

Emailer setup (1997) requiredfields (2002) NT error logs (1997) Quit revisited (1997) WebCat2b13MacPlugIn - more [date] problems (1997) How did *you* learn Web Catalog? (2000) Reading Field (2003) [WebDNA] SWITCH/CASE or SHOWIF (2008) Re:no [search] with NT (1997) RE: protect tag on NT (1997) [url] link (1998) Re[2]: Shopping Cart Directory (2000) Multiple prices (1997) WebCatalog can't find database (1997) BBEdit/HTMLcomments/WebCat/[/FONT] (1999) Time Remaining? (1998) Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997) Error Lob.db records error message not name (1997) Searching multiple fields from one form field (1997) A multi-processor savvy WebCatalog? (1997)