If Special Procedure (spDelP) at point "A" below returns "uaFail" I get a "Table is read
only" exception at point "B". Which then also results in the Application locking up.
So that Ctrl+Alt+Del has to be used to end the program.
Can anyone tell me what I am overlooking?
How do I overcome this problem?
procedure TdmFamily.qryParentUpdateRecord(DataSet: TDataSet;
UpdateKind: TUpdateKind; var UpdateAction: TUpdateAction);
begin
if UpdateKind = ukDelete then
begin
with dmFamily do
spDelP.Params[0].Value := qryParentP_NldValue;
try
dmFamily.spDelP.ExecProc; .......................A
UpdateAction := uaApplied;
except
UpdateAction := uaFail; ..........................B
end;
end
else
try
// apply updates
dmFamily.updParent.Apply(UpdateKind);
UpdateAction := uaApplied;
except
UpdateAction := uaFail;
end;
end;