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:

WebCatalog Mac 2.1b3 (1997) Beta version-Mac? (was Emailer update for Mac?) (1998) [listfiles] (2004) send mail problem? (1997) find with exceptions (1997) Adding time above 24 hours (2002) unsubscribe (1997) [WebDNA] SQLExecute Memory Leak (2008) FoundItems Question (1998) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) URGENT: Can't email orders - HELP #2 (1998) Hyperboard users wanting a quoted message (1998) Why does WebCat do this? (2001) CVS Files for databases (2000) Emailer help....! (1997) Separate SSL Server (1997) WebMerchant Orders Won't Process (2002) Make sure I understand this??? (1997) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Navigator 4.01 (1997)