Representing Recursive Relatiobships

B

Bruce

Say I have master table of inventory parts (PartID, PartNr, PartName,
....)

I also have a detail table for bill of materials (BOMID, ParentPartID,
BOMPartID, ...)

The two tables are in a one to many relatiobship linked by
PartID<>ParentPartID. BOMPartID in the detail table also references a
record in the master table.

This relationship can go several levels - i.e. each part in a bill of
materials record can in turn have parts in it's bill of material etc.
For example, Part A can have part B and part C in it's BOM, Part B may
also have parts D and E in it's BOM, part E might have part F in it's
BOM.

I would love to be able to display the detail table in a grid in a way
that the user can see in a tree-like fashion all the bill of materials
needed for a particular part.

Is there an elegant way to create these recursive relationships in
ADO.NET?

--Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top