Chached Updates
Posted: 29.07.2015, 12:25
Hi all.
I've a grid attached to a zQuery in cahchedUpdates mode.
The table has a Key field. I can insert and modify recors without problems, using a button with this code in Click event:
but, if I delete every records in the grid, and insert new records with values for key field previously used and push the save button, I get a "Duplicate Key error message". I guess that will be because the inserts are made before the deletes when applyUpdates is executed.
How I solve this issue?
zeos 7.1.3-stable
firebird 2.5.3
Thanks
I've a grid attached to a zQuery in cahchedUpdates mode.
The table has a Key field. I can insert and modify recors without problems, using a button with this code in Click event:
Code: Select all
with zqP do
if UpdatesPending then
begin
ApplyUpdates; CommitUpdates;
Refresh;
end;
How I solve this issue?
zeos 7.1.3-stable
firebird 2.5.3
Thanks