I'm using the latest MyDAC 4.X release.
Structure of MyQueryA : CustomerID (AutoInc)MyQueryA
|
-> MyQueryB
|
-> MyQueryC
Structure of MyQueryB : InvoiceID (AutoInc),CustomerID
Structure of MyQueryC : OrderID (AutoInc),InvoiceID,CustomerID
MyQueryC is Detail MyQuery of Master MyQueryB (MyQueryB.CustomerID = MyQueryC.CustomerID And MyQueryB.InvoiceID = MyQueryC.InvoiceID )
MyQueryB is Detail MyQuery of Master MyQueryA (MyQueryA.CustomerID = MyQueryB.CustomerID)
All table have indexes upon each xxxID fields.
TableC has 2 foreign indexes ( to tableB on InvoiceID,CustomerID fields)
TableB has 1 foreign index ( to tableA on CustomerID field)
I can populate TableA without any issues (INSERT + POST = OK)
I can populate TableB without any issues (INSERT + POST = OK)
I CAN'T correctly populate TableC.
I only can Insert 1 record. After, every new insert behave like an Edit call and the DBEdit component are filled with data from the 1st record. MyQueryC is in dsEDit state (instead of dsinsert).