MyDAC 4 : Insert no more working (does edit instead) ? [Solved : my fault]

MyDAC 4 : Insert no more working (does edit instead) ? [Solved : my fault]

Postby swierzbicki » Tue 02 Aug 2005 09:00

I'm using a MySQL 4.12 server. InoDB Database / Table type.
I'm using the latest MyDAC 4.X release.

MyQueryA
|
-> MyQueryB
|
-> MyQueryC


Structure of MyQueryA : CustomerID (AutoInc)
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).
Last edited by swierzbicki on Tue 02 Aug 2005 09:43, edited 1 time in total.
swierzbicki
 
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Postby swierzbicki » Tue 02 Aug 2005 09:37

Forget this ! I had two DevEX grid linked to the same Datasource (my mistake, some cut and paste :( )....

This lead the problem !
swierzbicki
 
Posts: 451
Joined: Wed 19 Jan 2005 09:59


Return to MySQL Data Access Components