Another logon question

From: Patrick Boucher <patrick.boucher_at_cum.qc.ca>
Date: 1997/10/16
Message-ID: <01bcda4d$36b68700$464cf68e_at_bouchepa.cum.qc.ca>#1/1


Hi everybody.

I have another "logon" question for you all. In my Forms 4.5 application, I have a startup screen with tabs that shows a list of available Oracle applications. The first time the user open this Form module, I don't want to connect to any database, so I managed to create an ON-LOGON trigger with a NULL in a particular condition. Each tab represents one application and when a user click on a tab, here is what I would like to do:
- Display my logon-screen (this works)

  • Logon to the database
  • Look if the connection is ok and display an error message if not.
  • If the connection is ok, display the right application canvas and replace the menu with the appropriate one. (this works)

I noticed that the ON-LOGON trigger fires only the first time when a connection doesn't work. Here how my ON-LOGON trigger looks like: BEGIN
  IF :CTRL.onglets_vbx IS NULL
  THEN
    NULL;
  ELSE
    LOGON(:GLOBAL.un, :GLOBAL.pw || '_at_' || :GLOBAL.connect_string, FALSE);

    IF NOT FORM_SUCCESS
    THEN

      SOFT_MESSAGES('E',FALSE, 'La connexion a échoué; vous devez vous ' ||
                               'reconnecter à nouveau.  Message: ' ||
DBMS_ERROR_TEXT) ;
      RAISE FORM_TRIGGER_FAILURE;

    END IF;
  END IF;
END; When a connection is successful, everything works just perfectly, every time. But if I enter a wrong password, the first time my message is displayed (the on-logon trigger fires correctly), but the second time nothing appends. The trigger don't fire. It fires only when there is a call to a OPEN_FORM procedure. So if I try to open a module the trigger fires and I get the message (to late unfortunately). I would like to trap a bad connection before calling a module. It also seems that only one call after the "LOGON" executes correctly. If I put a message after the soft_messages, the second message is not displayed.

So my question is:
Is there a way to provoke a connection, to make the on-logon trigger fires each time I issue a call to the LOGON procedure? If I don't have an ON-LOGON trigger everything is fine. But I really want to skip the first time connection. Is it possible that this is a bug?

Thanks for your help.

Patrick Boucher
Communaute urbaine de Montreal
Montreal, Qc
please also reply to patrick.boucher_at_cum.qc.ca Received on Thu Oct 16 1997 - 00:00:00 CEST

Original text of this message