Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Practice - Internal Code field for Heirarchial tabl
Message
 
To
31/08/2004 16:23:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00937935
Message ID:
00938316
Views:
28
Hi Cetin

Thanks for your response. I had given up a response for this thread <g>.

>IMHO on the long run this would be tedious and even defeat a simple treeview structure (NodeID,ParentID,NodeText). You might never know beforehand how much deep your grandchildren node would be. cCode field might quickly run out of space.

Yes that was one of my worry as I had put cCode to 30 chars and I knew the limitation for this app. And of course the management of the cCode was a bit of a worry.

>I suggest a structure like :
>
>NodeID,ParentId,NodeText,Level (0-root,1,...N),RootId (rootNode ID of this node),OrderInGroup

NodeID is iID in my case, okay
ParentId is iPID, okay
NodeText is cName, okay
Level is there a formula to get the depth of the node? From the cCode I could divide it by 3 to get the results, but now that we are avoiding it.
RootID I am not clear about, please explain, are you thinking of multiple root nodes?
OrderInGroup is the iSrNo, okay.

Thanks for your point of view for such a table. Also I had this thought that I could use cCode as "001002" to get a child and it's own children, grand-c, g-g-c, etc. records, will that be possible with this new structure?
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform