Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Friday afternoon toughie - tree endless loop
Message
From
01/02/2019 16:53:58
 
 
To
01/02/2019 14:23:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Miscellaneous
Thread ID:
01665871
Message ID:
01665874
Views:
87
>Had this problem recently though where the user ended up creating an endless loop.
>
>Original setup:
>
>Certas Insurance [Aurora, ON branch], Company_ID = 7204, ParentCoID = 4778 [Desjardin Insurance Co.]
>Certas Insurance [Mississauga, ON branch], Company_ID = 7682, ParentCoID = 7204
>

For structural changes under user control, I always use belt+suspenders approach, first force a backup, then edit after saving either columns or work on temp columns copied on start. User can ALWAYS fall back.

....
>The only way I can think of to cover off all possibilities is to process the tree from the top and see if at any node an endless loop has been set up - a lot of cpu work given that some of the larger insurance companies can have hundreds of branches under them.

Given good indices on small data types this should tax disc more than CPU (unless all data is cached), but that check should be quite fast.

Can you post count() grouped by level ? Or post 2 zip files, with and without errors to play with ?

rgds

thomas
Previous
Reply
Map
View

Click here to load this message in the networking platform