Re: [WebDNA] Query re: autonumber

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 105531
interpreted = N
texte = > Ken, > > Thanks for that. I think I'll stick to using cart for record IDs > then. > > A follow up question, if I am doing a bulk append to a db then I can > only create one [cart] on a template, so if I use the following > within a search context am I safe in not creating duplicate cart IDs: > > [search db=import.db&neIDdatarq=find_all][founditems] > > [append db=appendto.db]recordID=[cart][index][/append] > > [/founditems][/search] > > Thanks > - Tom Hi Tom, in the situation you just asked about, I have been in the habit of writing the IDs like this: [founditems] [append db=appendto.db]recordID=[cart]_[index][/append] [/founditems] ...because unless one knows *exactly* how cart strings are created... and what all are their possible values.. then conceivably a cart string could have already in the past been what you were about to write with your current (this page render) [cart] concatenated with one more digit (the [index]). RIght? But by separating the [cart] from the [index] with the underscore, then you KNOW that the complete ID will be unique because the unadulterated [cart] is always unique, and after the underscore will be unique on each iteration of [founditems] (in the context of *that* [cart]). If someone argues my case here, and says you were safe the way you were about to do it.. then I presume that it means they know more than I do about the possible range of cart strings. There must have been discussion on list in the past about that... but I think I was away at that time. ------------ Govinda govinda.webdnatalk@gmail.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Query re: autonumber (Govinda 2010)
  2. Re: [WebDNA] Query re: autonumber (Tom Duke 2010)
  3. Re: [WebDNA] Query re: autonumber (Kenneth Grome 2010)
  4. Re: [WebDNA] Query re: autonumber (Govinda 2010)
  5. Re: [WebDNA] Query re: autonumber (Govinda 2010)
  6. Re: [WebDNA] Query re: autonumber (Kenneth Grome 2010)
  7. Re: [WebDNA] Query re: autonumber (Tom Duke 2010)
  8. Re: [WebDNA] Query re: autonumber (Kenneth Grome 2010)
  9. [WebDNA] Query re: autonumber (Tom Duke 2010)
> Ken, > > Thanks for that. I think I'll stick to using cart for record IDs > then. > > A follow up question, if I am doing a bulk append to a db then I can > only create one [cart] on a template, so if I use the following > within a search context am I safe in not creating duplicate cart IDs: > > [search db=import.db&neIDdatarq=find_all][founditems] > > [append db=appendto.db]recordID=[cart][index][/append] > > [/founditems][/search] > > Thanks > - Tom Hi Tom, in the situation you just asked about, I have been in the habit of writing the IDs like this: [founditems] [append db=appendto.db]recordID=[cart]_[index][/append] [/founditems] ...because unless one knows *exactly* how cart strings are created... and what all are their possible values.. then conceivably a cart string could have already in the past been what you were about to write with your current (this page render) [cart] concatenated with one more digit (the [index]). RIght? But by separating the [cart] from the [index] with the underscore, then you KNOW that the complete ID will be unique because the unadulterated [cart] is always unique, and after the underscore will be unique on each iteration of [founditems] (in the context of *that* [cart]). If someone argues my case here, and says you were safe the way you were about to do it.. then I presume that it means they know more than I do about the possible range of cart strings. There must have been discussion on list in the past about that... but I think I was away at that time. ------------ Govinda govinda.webdnatalk@gmail.com Govinda

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:

syntax question, not in online refernce (1997) Post size Limit? (1998) Colors in cart (2002) multipart (2004) Coding Style (2000) [WebDNA] add rows dynamically (2018) WebCat2 Append problem (B14Macacgi) (1997) [thisurl] or another way (2000) [date format] w/in sendmail (1997) off topic fetch vs PCS photomaster (1997) Problems appending to database (1997) WCS Newbie question (1997) One more try (1997) WebCat2 - Getting to the browser's username/password data (1997) [OT] JS Help PLEASE (2006) [WebDNA] can't map webdna to .tpl (2017) WebCatalog2 Feature Feedback (1996) HTML Editors (1997) Entry pages (was: WebCatalog MAJOR drawback) (1998) encrypt but with normal characters for result? (2005)