ON-LOGON Trigger problem?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: ON-LOGON Trigger problem?

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Location
    Pak
    Posts
    64

    ON-LOGON Trigger problem?

    I have developed an application, in the ON-LOGON at form
    level trigger, i have written the connection string:
    LOGON( 'HC', 'HC@HELLO' );

    in this connection string i have used the service name HELLO. HELLO
    connects the application with the server using the IP ADDRESS of
    server. I have installed the application on a client machine, its
    working and running well. The problem is if the server is shutdown or
    here is any problem in netwok, when user run the program, it gives the
    error message: TNS:could not resolve the service name.
    and open the Logon box and again ask for the username, password and
    database service name. If user press the cancle button, it closes the
    logon box and shows the application form (but disconnected from the
    database). I need that if user clicks the cancle button then
    application must be closed, it should not show the canvauses of the
    application.

    Any sugesstion will be highly appriciated.

    Regards,

    Nametullah kalair
    Always Remember Power is Your.

  2. #2
    Join Date
    Nov 2004
    Location
    Mumbai, India
    Posts
    452
    try :
    LOGON( 'HC', 'HC@HELLO',FALSE );
    There are three kinds of lies: Lies, damned lies, and benchmarks...

    Unix is user friendly. It's just very particular about who it's friends are.

    Oracle DBA

  3. #3
    Join Date
    Feb 2003
    Location
    Pak
    Posts
    64
    Problem is same, but with little change, now it doesnt show the connect dialog box, and directly goes to the application and shows the canvuses. I need that application must be closed. I tried to use the EXIT_FORM after checking the status of login, if false then Exit fromt the form. But EXIT_FORM is illegal ristricted procedure to call in ON-LOGON trigger.
    Always Remember Power is Your.

  4. #4
    Join Date
    Feb 2005
    Posts
    158
    From the HELP on the ON-LOGON trigger

    "On Failure Oracle Forms attempts to exit the form gracefully, and does not fire the Post-Logon trigger. "

    So rather than EXIT_FORM, try RAISE FORM_TRIGGER_FAILURE;

  5. #5
    Join Date
    Feb 2003
    Location
    Pak
    Posts
    64
    Thanks,

    I have used this code and it is working successfully:

    -------------------------------
    LOGON( 'HC', 'HC@HELLO', FALSE );

    IF NOT FORM_SUCCESS() THEN
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    -------------------------------

    Regards,

    Nametullah kalair
    Always Remember Power is Your.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width