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
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?