Record not found or changed by another user
Pessoal eu criei uma Store Procedure numa Tabela chamada Pedido para atualizar a quantidade de produto mas na aplicação quando eu gravo o Pedido me da esse erro ´Record not found or changed by another user´.
* --Retornando qtde de estoque */
update PRODUTO PRO
set PRO.QTDEATUAL=PRO.QTDEATUAL+(OLD.QTDEPEDIDO*OLD.FATORCONVERSAO),
PRO.QTDEATUAL=PRO.QTDEATUAL-(NEW.QTDEPEDIDO*NEW.FATORCONVERSAO)
where PRO.IDPRODUTO=OLD.IDPRODUTO
and PRO.IDFILIAL=OLD.IDFILIAL;
* --Retornando qtde de estoque */
update PRODUTO PRO
set PRO.QTDEATUAL=PRO.QTDEATUAL+(OLD.QTDEPEDIDO*OLD.FATORCONVERSAO),
PRO.QTDEATUAL=PRO.QTDEATUAL-(NEW.QTDEPEDIDO*NEW.FATORCONVERSAO)
where PRO.IDPRODUTO=OLD.IDPRODUTO
and PRO.IDFILIAL=OLD.IDFILIAL;
Rafael Mattos
Curtidas 0