2013-10-02 4 views
0

Oracle Forms에서 간단한 프로그램을 만들었습니다. 아래 코드는 제출 버튼을 누를 때 트리거입니다. 여기트리거, 프로그램의 흐름이 멈추지 않습니다

그것이 :

BEGIN 
CREATE_RECORD; 

IF :USERS.USERNAME IS NULL THEN 
    MESSAGE('Please enter Username'); 
    GO_ITEM('USERNAME'); 

ELSIF :USERS.PASSWORD IS NULL THEN 
    MESSAGE('Please enter Password'); 
    GO_ITEM('PASSWORD'); 

ELSIF :USERS.PASSWORD2 IS NULL THEN 
    MESSAGE('Please confirm your Password'); 
    GO_ITEM('PASSWORD2'); 

ELSIF :USERS.PASSWORD != :USERS.PASSWORD2 THEN 
    MESSAGE('Password did not match'); 
    GO_ITEM('PASSWORD2'); 

ELSIF :USERS.NAME IS NULL THEN 
    MESSAGE('Please enter your Name'); 
    GO_ITEM('NAME'); 

ELSIF :USERS.POSITION IS NULL THEN 
    MESSAGE('Please enter your Position'); 
    GO_ITEM('POSITION'); 

END IF; 

IF :USERS.ACCESS_LEVEL = 'admin' THEN 

    IF :USERS.ADMIN_PASS = 'eweb1' THEN 

     alert:= show_alert('USER_CREATED'); 

      IF alert = alert_button1 THEN 
      MESSAGE('OK'); 
      END IF; 

    ELSE 
       MESSAGE('Administrator Password did not match'); 
       GO_ITEM('ADMIN_PASS'); 
    END IF; 

    ELSE 
     alert:= show_alert('USER_CREATED'); 

      IF alert = alert_button1 THEN 
       /* foo */ 
      END IF; 

END IF; 

END; 

양식이 두 번째 암호 (암호 2)가 일치하지 않는 그것은 '비밀번호가 일치하지 않습니다'라고 메시지를 표시 할 때, 여전히 흐르고 때와 같은 오류를 발생 중지하는 대신 다음 명령문을 읽고 버튼을 다시 누를 때까지 기다리십시오. 나는 이것을 고칠 수 있기를 바란다. TNX

답변

1
계속하기 전에 메시지를 확인하면 운영자를 기다리는 메시지를 말할 수

:

MESSAGE('Please enter Username', ACKNOWLEDGE); 
관련 문제