Re: Every other record deleted
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 63667
interpreted = N
texte = The typical cause of an every-other deletion is doing a deletion inside a founditems loop. As soon as you delete a record, the indexes of the founditems set have been changed so the next iteration of the loop ends up skipping a record. The same thing occurse with deletefile inside a listfiles loop.As an illustration, say you've found 10 records. On the fourth pass through the loop, you've got index=4. You delete that record. Now the records that were indexed 5-10 get relabeled (by WebDNA) as 4-9. On the next pass through the loop, you've got index=5 - but this is the new index 5, the old index 6. You've skipped the old 5th record.This is considered a "behavior" of WebDNA rather than a "bug". It's just something you've got to deal with by never deleting within a [founditems] loop. What I typically do to get around this is to build a list of records (generally their SKU field or equivalent) that I need to delete. Then, after exiting the loop, I delete all the records I need to delete at once.Brian FriesBrainScan SoftwareOn Dec 22, 2005, at 7:41 AM, Dan Strong wrote:> I have a database that has had every *other* record wiped clean > (tabs still there, just every field in those records wiped clean). > This database/system has been chugging along fine for 2+ years... > anybody ever seen something similar?>> -Dan>-------------------------------------------------------------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:
The typical cause of an every-other deletion is doing a deletion inside a founditems loop. As soon as you delete a record, the indexes of the founditems set have been changed so the next iteration of the loop ends up skipping a record. The same thing occurse with deletefile inside a listfiles loop.As an illustration, say you've found 10 records. On the fourth pass through the loop, you've got index=4. You delete that record. Now the records that were indexed 5-10 get relabeled (by WebDNA) as 4-9. On the next pass through the loop, you've got index=5 - but this is the new index 5, the old index 6. You've skipped the old 5th record.This is considered a "behavior" of WebDNA rather than a "bug". It's just something you've got to deal with by never deleting within a [founditems] loop. What I typically do to get around this is to build a list of records (generally their SKU field or equivalent) that I need to delete. Then, after exiting the loop, I delete all the records I need to delete at once.Brian FriesBrainScan SoftwareOn Dec 22, 2005, at 7:41 AM, Dan Strong wrote:> I have a database that has had every *other* record wiped clean > (tabs still there, just every field in those records wiped clean). > This database/system has been chugging along fine for 2+ years... > anybody ever seen something similar?>> -Dan>-------------------------------------------------------------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/
Brian Fries
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:
flushdatabases (1997)
test (2001)
[WebDNA] XML Parsing Error Help (2010)
WebCatalog2 Feature Feedback (1996)
[index] (1997)
RE: format problem on NT? (1997)
PIXO support (1997)
A question on sub-categories (1997)
Snake Bites (1997)
OT: zipcodes (2002)
[OT] Linux -> Winderz (2005)
Message Board (2001)
I need hosting (2003)
path hierarchy notation (1998)
WebDNA Quick Reference (Reserved Words) (2000)
Links inside of Text Areas (2000)
Shownext Tricks (2000)
[table] retained in memory (2006)
international time (1997)
WebCatalog Technical Reference (1997)