Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- with DataModulo.Query do
- begin
- if (Active) then
- Close;
- SQL.Clear;
- SQL.Add('UPDATE PARCELAS SET VALOR = :VALOR WHERE ID = :ID RETURNING (OLD.VALOR)');
- ParamByName('ID').AsInteger := AID;
- ParamByName('VALOR').AsCurrency := AValor;
- Open;
- auxValorAntigo := FieldByName('VALOR').AsCurrency;
- end;
- DataModulo.Transaction.Commit;
- except
- on E: Exception do
- begin
- DataModulo.Transaction.Rollback;
- raise Exception.Create('Erro ao alterar o valor da parcela!' + #13 + E.Message);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement