Re: [REPLACE] inside [FOUNDITEMS]

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19204
interpreted = N
texte = >>>I don't believe that [replace] will change the [index] values (the >>>positions of the rows in the db), just the values in the database. >> >>I believe you are correct.This is not correct. Replace *can* change the index values, I've proven it in my testing ...>For my personal feeling [Replace] seems to be save when you have a >unique ID and use just this value as main parameter for [Replace].Yes, that's what I said earlier, but this only works if you do *not* use the replace context to change the unique ID -- and you must also be careful that any other fields you are changing do *not* appear in the search parameters. If either one of these situations occurs, it is possible for WebCat to change the wrong records, because the index values will probably change ...>Every programmer develops his personal style over time. For me, I never >ever give my program the chance to replace more than one record or delete >records from the same selection where I'm in at the moment.Neither [delete] nor [replace] will do what you're trying to avoid -- unless you use them INSIDE a founditems context -- so you're safe if you ONLY use replace and delete on their own, and never inside a founditems loop.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: [REPLACE] inside [FOUNDITEMS] (Kenneth Grome 1998)
  2. Re: [REPLACE] inside [FOUNDITEMS] (Peter Ostry 1998)
  3. Re: [REPLACE] inside [FOUNDITEMS] (Michael Winston 1998)
  4. Re: [REPLACE] inside [FOUNDITEMS] (Kenneth Grome 1998)
  5. Re: [REPLACE] inside [FOUNDITEMS] (Bob Minor 1998)
  6. Re: [REPLACE] inside [FOUNDITEMS] (PCS Technical Support 1998)
  7. Re: [REPLACE] inside [FOUNDITEMS] (Michael Winston 1998)
  8. Re: [REPLACE] inside [FOUNDITEMS] (PCS Technical Support 1998)
  9. Re: [REPLACE] inside [FOUNDITEMS] (Dave MacLeay 1998)
  10. Re: [REPLACE] inside [FOUNDITEMS] (PCS Technical Support 1998)
  11. Re: [REPLACE] inside [FOUNDITEMS] (Kenneth Grome 1998)
  12. RE: [REPLACE] inside [FOUNDITEMS] (Olin 1998)
  13. [REPLACE] inside [FOUNDITEMS] (Michael Winston 1998)
  14. Re: [REPLACE] inside [FOUNDITEMS] (Dave MacLeay 1998)
  15. RE: [REPLACE] inside [FOUNDITEMS] (Olin 1998)
>>>I don't believe that [replace] will change the [index] values (the >>>positions of the rows in the db), just the values in the database. >> >>I believe you are correct.This is not correct. Replace *can* change the index values, I've proven it in my testing ...>For my personal feeling [replace] seems to be save when you have a >unique ID and use just this value as main parameter for [replace].Yes, that's what I said earlier, but this only works if you do *not* use the replace context to change the unique ID -- and you must also be careful that any other fields you are changing do *not* appear in the search parameters. If either one of these situations occurs, it is possible for WebCat to change the wrong records, because the index values will probably change ...>Every programmer develops his personal style over time. For me, I never >ever give my program the chance to replace more than one record or delete >records from the same selection where I'm in at the moment.Neither [delete] nor [replace] will do what you're trying to avoid -- unless you use them INSIDE a founditems context -- so you're safe if you ONLY use replace and delete on their own, and never inside a founditems loop.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

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:

GrandTotal not right (1997) Searching for (field1 OR field2) AND field3 (2000) Multiple prices (1997) linetiems in thankyou.tpl (1997) WebCatalog and Macromedia Flash (1998) RE: OK, here goes... (1997) problems with 2 tags (1997) Sorting by date (1997) Location of Webcat site in folder hierarchy (1997) Re:quit command on NT (1997) Bug in capitalize ... ? (2003) Support ?? (1997) possible, WebCat2.0 and checkboxes-restated (1997) Error with [applescript] (1999) Webcat2, WebCommerce, Mod 10 etc. (1997) Assigning carts (1998) Showing unopened cart (1997) I'm tired of all this! (2000) SUBMIT buttons not working.... (2000) https validation (2001)