PDA

View Full Version : Parent-Child & Child2 Sets


ABC123

John Castle
02-02-2005, 01:51 AM
I have a set with an order header parent linked to an order item child by order number and also linked to the same child a second time by customer account code.

The aim of this arrangement is to see items relating to an order and also to see a customers history of all items they bought.

However this leads to record lock errors on my standalone pc with only one copy of the app running.

Is there a better way of achieving this? For now I have replace the second instance of the child table with another table which is a copy of the child under a different name.

Tom Cone Jr
02-02-2005, 03:07 AM
I'm not a fan of sets which include multiple instances of the same child table. However....

I'd try this arrangement:

Customers, linked 1:N to order_hdrs by customer number, and order_hdrs linked 1:N to order_items by invoice number. This creates a parent=="child=="grandchild set.

In the same set, I'd also link customers 1:N to order_items, by customer number.

You'd wind up with two child tables, one of which has a grandchild table, if you see what I mean.

Using this arrangment for any customer you could see the details on any order, while also seeing the details of all orders.

-- t

John Castle
02-04-2005, 12:39 AM
Thanks for the suggestion. Sorry for the delay in replying - some customer meetings take longer than expected!

I will try this idea - my aim was to have an order form (header plus many items) that also showed an order history - ie all previous items ordered.

For now I have removed the 2nd link to sales order items, duplicated that table and contents and used that in the relationship instead to show order history ie -

Order Header -" Order Items
-" Items Ordered History