Hello,
i’ve discovered another problem in Data Abstract. If applying data fails for some reason (for example foreign key failure, primary key failure) and TDAMemDataTable.DetectPKDuplicates property is enabled then an exception “Primary key violation” is raised instead of reconcile error form. Problem is in TDABaseDataAdapter.InternalApplyUpdatesAndThrowFailures method at these lines:
// step4: ThrowFailures
lFailedDeltas := TList.Create;
try
for i := 0 to lTablesWithDetailsList.Count-1 do
for j := 0 to TDADataTable(lTablesWithDetails[i]).Delta.Count - 1 do
if TDADataTable(lTablesWithDetails[i]).Delta.Changes[j].Status = csFailed then
lFailedDeltas.Add(TDADataTable(lTablesWithDetails[i]).Delta.Changes[j]);
for i := 0 to lTablesWithDetailsList.Count-1 do
TDADataTable(lTablesWithDetails[i]).MergeDelta; -- Exception HERE
ThrowFailures(lTablesWithDetailsList,lFailedDeltas);
Exception is raised in TDADataTable(lTablesWithDetails[i]).MergeDelta so no reconcile form is shown.
I spent whole afternoon on this bug 'cause i had no idea what was happening. In my case, there was only one record in my datatable…i edited this record, tried to apply updates and “primary key violation” was raised. Partially because of that and partially because i’ve another few reported topics with no information from you, i’m running out of patience!
Can you just answer a few of them or tell me what’s happening? I understand you cannot fix everything immediatelly, but i just need to know what will you do with the bug to decide on my next steps.
Here’s the list oh issues that are important for me and i have no reaction for a few months:
- [68217 Closed] DataTable.FindKey fails during fast multiple record insertion
- TDAMemDataTable, cloned datatable with calculated fields fails to open
- [68230 Closed] TDADataTable.NotifyFieldsClear
- TDAMemDataTable, AV when short datString value is put to string field (XE3)
- TDADataTable.MergeDelta strange behavior
Provide me some information of these issues.
Thanks. Jaroslav