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?