procedure SaveUpd(ds: TOracleDataSet);
begin
with ds do
try
if State in [dsInsert,dsEdit] then Post;
if UpdatesPending then
begin
Session.ApplyUpdates([ds],false);
Session.CommitUpdates([ds]);
end;
except
on E:Exception do
begin
Session.CancelUpdates([ds]);
raise;
end;
end;
end;