Updated failed. Found XXX records.
Posted: Wed 18 Jun 2008 22:21
Dear Sirs
I think that I found an error in the last release of MyDAC (5;....).
I have a large system working perfectly (Delphi2007 - MySQL 5,0,...) and after I installed
the last release of MyDAC, in 2 different routines I become to receive an msg:
"Updated failed. Found XXX records."
After a long time over the problem, I found the following common points that appears to me
to be related with it:
1 - the error appears when the system tries to make a post over a TMyTable in edit mode;
2 - the table data has a primary key with 4 or 5 fields: the first 3-4 integer fields and
the last field of the key is an auto incremented field (this is the important fact);
What I found:
A - if instead of the fifth auto incremented field I put a normal integer field: it works without error;
B - with the 5th.field auto incremented, if I put the name of all fields in the "KeyFields" property of the table, it works without error;
C - with auto increment in the last key position, setting the debug property of the table and using MyDacVCL, I found that the edit string generated by the TMyTable shows only the auto incremented field in the where clause, as it was the unique component of the key.
But, if the last field of the key is not auto incremented, the where contains all the fields of the key;
You can find an example (code and data) the reproduces the error in the following link:
http://www.drdsistemas.com.br/util/myda ... 6-2008.zip
I would appreciate very much to receive some news from you soon, about this error, since I am not sure about other points in my systems that this error could happen.
cordially yours
I think that I found an error in the last release of MyDAC (5;....).
I have a large system working perfectly (Delphi2007 - MySQL 5,0,...) and after I installed
the last release of MyDAC, in 2 different routines I become to receive an msg:
"Updated failed. Found XXX records."
After a long time over the problem, I found the following common points that appears to me
to be related with it:
1 - the error appears when the system tries to make a post over a TMyTable in edit mode;
2 - the table data has a primary key with 4 or 5 fields: the first 3-4 integer fields and
the last field of the key is an auto incremented field (this is the important fact);
What I found:
A - if instead of the fifth auto incremented field I put a normal integer field: it works without error;
B - with the 5th.field auto incremented, if I put the name of all fields in the "KeyFields" property of the table, it works without error;
C - with auto increment in the last key position, setting the debug property of the table and using MyDacVCL, I found that the edit string generated by the TMyTable shows only the auto incremented field in the where clause, as it was the unique component of the key.
But, if the last field of the key is not auto incremented, the where contains all the fields of the key;
You can find an example (code and data) the reproduces the error in the following link:
http://www.drdsistemas.com.br/util/myda ... 6-2008.zip
I would appreciate very much to receive some news from you soon, about this error, since I am not sure about other points in my systems that this error could happen.
cordially yours