utilisation du déclencheur When-Button-pressed pour acceder par un formulaire oracle forms10g
DECLARE
userid compte.identifiant%type;
pwd compte.motpasse%type;
alert number;
CURSOR C_connect IS
SELECT identifiant, motpasse FROM compte;
BEGIN
OPEN C_connect ;
FETCH C_connect INTO userid,pwd;
IF((userid=:compte.identifiant) and (pwd=:compte.motpasse)) THEN
-- aller sur la fenetre d'acceuil de l' application
BELL;
CLEAR_FORM(NO_COMMIT, FULL_ROLLBACK);
NEW_FORM('ACCEUIL.fmx',FULL_ROLLBACK, NO_QUERY_ONLY ,SHARE_LIBRARY_DATA,'default');
ELSE
set_alert_property('Message',alert_message_text,'Erreur de conncexion:
verifier votre idtentifiant et mot de passe');
alert := show_alert('Message');
go_item('nom');
:control.nbre:=:control.nbre+1;
END IF;
CLOSE C_connect;
IF (:control.nbre)>=3 Then
set_alert_property('Message',alert_message_text,'Erreur de conncexion:
nombre de tentatavie atteint');
alert := show_alert('Message');
exit_form(No_COMMIT,NO_ROLLBACK);
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
.
|
No comments:
Post a Comment