if dsUnidadOperativa.Transaction.InTransaction then
begin
if Application.MessageBox('Desea GUARDAR los movimientos realizados?','Pregunta',mb_YesNo+mb_IconQuestion)=idYes then
begin
DataModule2.trsCasas.Commit;
end
Else
begin
DataModule2.trsCasas.Rollback;
Action:=caFree;
end;
end;