I want to create a database of hierarchical data that a user can define and navigate through using a TreeView control, similar to a directory tree in Explorer. I know this has been done lots of times by other people, so what I am looking for is some info that would explain what the database structure might look like, and how one would go about populating a TreeView control with that data. It doesn't even have to be specific to VB, although I am using VB6.
I think that the basic database structure would consist of two tables, one containing all of the leaf elements, and another defining their relationships to one another (parent/child leaves), but I am having difficulty figuring out how I would navigate through that database and populate a Treeview control (i.e. locate all the topmost parent leaves, then each of their children, their childrens children, etc., until I reach the end).
Any help or references to other material would be greatly appreciated!
-Mike
--------------------------
Michael Koepke, Consultant
Nims Associates, Inc.
mkkoepke@aol.com