Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursion, how best to code ?
Message
From
24/01/2001 11:33:30
Tan Aik Jin
Aranea WebLab Sdn Bhd
Kuala Lumpur, Malaysia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Recursion, how best to code ?
Miscellaneous
Thread ID:
00467922
Message ID:
00467922
Views:
38
I have a table with two fields, the first a primary ID field, the second is memo. This table is used to store certain often used invoice item descriptions. It served my users fine, that is until now. You see, they are requesting that I incorporate a feature where they just have to select one Id and this ID in turn points to a few other ID, so that they do not have to select those items in each of their invoice line item. I am calling this Compound ID.

I am thinking of adding a few more fields to let my users define their own compound ID to those existing IDs. I know I can just add another table to do this. What I am worrying about is cyclic referencing. Example :-
ID Desc Points To
-------------------------------------------------------
A1 xxxxx -
A2 xxxxx -
C1 xxxxx A1, C2
C2 xxxxx A3, C1

How do I prevent this ? Should I use recursion ? If so how best to code ?

Thanks. I know you great guys should be able of offer some help.
Next
Reply
Map
View

Click here to load this message in the networking platform