Forms builder oracle

zako2012 Messages postés 6 Date d'inscription   Statut Membre Dernière intervention   -  
zako2012 Messages postés 6 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,


comment ajjouter un control de saisie sur un champ dans oracle forms builder i6 j ai essayer ce code mais ca marche pas declare


nbcomm number;
nbcomm1 number;

bouton_alerte NUMBER;

begin
select sum(mtpmt) into nbcomm
from payment1 where :payment1.refinv= :invoice1.refinv;

select mtinv into nbcomm1
from invoice1 where :payment1.refinv= :invoice1.refinv;

if (nbcomm>nbcomm1) then
bouton_alerte := Show_Alert('payment invalide manton tres grand');
RAISE FORM_TRIGGER_FAILURE;
end if ;


end;
A voir également:

1 réponse

zako2012 Messages postés 6 Date d'inscription   Statut Membre Dernière intervention   1
 
j ai trouver la solution :p


declare
alert_id alert;
choice number;
begin

select sum(mtpmt) into :invoice1.somme
from PAYMENT1
where payment1.refinv= :invoice1.refinv;
:invoice1.somme:=:invoice1.somme+:PAYMENT1.mtpmt;


if :invoice1.SOMME >:invoice1.mtinv then
alert_id := Find_Alert('VALEUR_INVALID');
choice := Show_ALert(alert_id);

IF Id_Null(alert_id) THEN
Message('The alert named: Are you sure? does not exist');
ELSE
choice := Show_Alert(alert_id);
END IF;
RAISE Form_Trigger_Failure;

end if;
end;
0