Master/Detail Relationship
Posted: 01.05.2006, 02:37
Hi,
I'm a new user of ZeosDBO and have question. I am trying to define a master/detail connection between two zQuery components. I set the MasterSource and MasterFields to the controlling Query. And I have set the Filter to a field in both the master and detail query. Making sure that the Filtered=true. But my detail contains more records than it should. I'm not even sure if I need to use the Filter or if I am, what I should be setting it to. My example:
Query1 (SELECT * FROM Orders;)
... (relative field listed)
OrderID (integer, autoinc, primary)
...
Query2 (SELECT * FROM OrderDetails;)
... (relative field listed)
OrderDetailsID (integer, autoinc, primary)
OrderID (integer)
...
MasterSource=Query1
MasterFields=OrderID
Filter=OrderID=OrderID
Filtered=true
Any help would be appreciated. Thanks
Tony
I'm a new user of ZeosDBO and have question. I am trying to define a master/detail connection between two zQuery components. I set the MasterSource and MasterFields to the controlling Query. And I have set the Filter to a field in both the master and detail query. Making sure that the Filtered=true. But my detail contains more records than it should. I'm not even sure if I need to use the Filter or if I am, what I should be setting it to. My example:
Query1 (SELECT * FROM Orders;)
... (relative field listed)
OrderID (integer, autoinc, primary)
...
Query2 (SELECT * FROM OrderDetails;)
... (relative field listed)
OrderDetailsID (integer, autoinc, primary)
OrderID (integer)
...
MasterSource=Query1
MasterFields=OrderID
Filter=OrderID=OrderID
Filtered=true
Any help would be appreciated. Thanks
Tony