I Need Help with the LOGON Built-in

Hello I have the following problem, I have a code implemented in the trigger ON-LOGON I will show them the code.
DECLARE
--Numero de Intentos Permitidos
num_intentos NUMBER :=3;
--Variables de Coneccion
usu VARCHAR2(80);
pass VARCHAR2(80);
conec VARCHAR2(80);
upc VARCHAR2(200);
coneccion BOOLEAN:=FALSE;
--Numero de Erro
num_error NUMBER;
BEGIN     
     --Ciclo que controla el numero de intentos
     FOR i IN 1..num_intentos
     LOOP
     --Muestra la pantalla logon de Oracle Forms
     LOGON_SCREEN;
     --Se recupera los valores de la coneccion.
     usu := GET_APPLICATION_PROPERTY(USERNAME);
     pass := GET_APPLICATION_PROPERTY(PASSWORD);
     conec := GET_APPLICATION_PROPERTY(CONNECT_STRING);
--Digito Cancel
IF NOT FORM_SUCCESS THEN
k_mensajes.push('No es posible establecer la Coneccion, Contacte con el Administrador del Sistema','E');
EXIT;
END IF;
--Se Desconecta cualquier session
LOGOUT;
--Verificamos que los datos de coneccion no esten nulos
IF ((usu IS NULL) AND (pass IS NULL) AND (conec IS NULL)) THEN
     k_mensajes.push('Los Datos para establecer la Coneccion estan incompletos','E');
RETURN;
END IF;
--Realizando la coneccion
IF ((usu IS NOT NULL) AND (pass IS NOT NULL) AND (conec IS NOT NULL)) THEN
     LOGON(usu,pass||'@'||conec,FALSE);
     num_error:=DBMS_ERROR_CODE;     
ELSE
     LOGON(usu,pass,FALSE);
     num_error:=DBMS_ERROR_CODE;
     coneccion :=FALSE;
END IF;     
RETURN;
--Finalizando el Ciclo  
     END LOOP;
     IF NOT coneccion THEN
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
The problem is that when I capture the the I number of error, I pass it to the ON-ERROR and of there I verify that I number of error it is and I throw the message, but I am not able to contralar the sequence among the triggers.
I will show them the code of the trigger ON-ERROR:
DECLARE
     --Numero de Error
     num_error NUMBER;
BEGIN
     num_error:=DBMS_ERROR_CODE;
--Se Verifica el Tipo de Error
IF num_error= -1017 THEN
     --El Usuario ingreso mal la contraseña
     k_mensajes.push('El Password Ingresado no es Valido.','E');
     LOGON_SCREEN;     
ELSIF num_error= -28000 THEN
     --El Usuario esta Bloqueado
     k_mensajes.push('El Usuario esta Bloqueado, Contacte con el Administrador del Sistema.','E');
ELSIF num_error= -28002 THEN
     --La Contraseña del Usuario ha Expirado
     k_mensajes.push('Su Password va Expirar, favor cambiarla antes de que Expire.','E');
     CALL_FORM (lower('S_SEG_CAMBPASS'),NO_HIDE,DO_REPLACE);
--======> Cuando el valor es 0 indica que la coneccion fue establecida <=====     
ELSIF num_error= 0 OR num_error IS NULL THEN
     NULL;
--======>Cuando el valor es -24309 hay una sesion conectada, se realiza la desconeccion de esa sesion. <======     
ELSIF num_error= -24309 THEN
     NULL;
     LOGOUT;
ELSIF num_error= -1403 THEN
     NULL;
ELSE
     --Si es otro error
     k_mensajes.push('Error al Ingresar '||TO_CHAR(num_error)||', Contacte con el Administrador del Sistema','E');
     NULL;
END IF;
END;
If somebody can help me or to indicate me where this my error, because I need to look for the way to tell to the user that this blocked, or that I enter bad their password.

Hi!
I think this will help us:
declare
   --Numero de Intentos Permitidos  == number of allowed ....
   num_intentos                                 number := 3;
   --Variables de Coneccion  == connection variables
   usu                                          varchar2( 80 );
   pass                                         varchar2( 80 );
   conec                                        varchar2( 80 );
   upc                                          varchar2( 200 );
   coneccion                                    boolean := false;
   num_error                                    number;
begin
   --Ciclo que controla el numero de intentos
   for i in 1 .. num_intentos
   loop
      --show Oracle Forms logon screen
      logon_screen;
      --save connection settings
      usu := get_application_property( username );
      pass := get_application_property( password );
      conec := get_application_property( connect_string );
      -- Exit the loop
      if not form_success
      then
         k_mensajes.push
            ( 'No es posible establecer la Coneccion, Contacte con el Administrador del Sistema'
          , 'E' );
         exit;
      end if;
      -- Disconnect
      logout;
      -- Test for null values
      if (     ( usu is null )
          and ( pass is null )
          and ( conec is null ) )
      then
         k_mensajes.push( 'Los Datos para establecer la Coneccion estan incompletos'
          , 'E' );
         return;
      end if;
      -- now make the connection
      if (     ( usu is not null )
          and ( pass is not null )
          and ( conec is not null ) )
      then
         logon(
            usu
          , pass || '@' || conec
          , false );
         num_error := dbms_error_code;
      else
         logon(
            usu
          , pass
          , false );
         num_error := dbms_error_code;
         coneccion := false;
      end if;
      return;
   end loop;
   if not coneccion
   then
      raise form_trigger_failure;
   end if;
end;And then:
declare
   num_error                                    number;
begin
   num_error := dbms_error_code;
   -- discern error type
   if num_error = -1017
   then
      --password entered is invalid
      k_mensajes.push( 'El Password Ingresado no es Valido.', 'E' );
      logon_screen;
   elsif num_error = -28000
   then
      --user is blocked
      k_mensajes.push
               ( 'El Usuario esta Bloqueado, Contacte con el Administrador del Sistema.'
       , 'E' );
   elsif num_error = -28002
   then
      --password is expired
      k_mensajes.push( 'Su Password va Expirar, favor cambiarla antes de que Expire.'
       , 'E' );
      call_form(
         lower( 'S_SEG_CAMBPASS' )
       , no_hide
       , do_replace );
   --======> 0 means that the connection was succesfully made <=====
   elsif    num_error = 0
         or num_error is null
   then
      null;
   --======>Cuando el valor es -24309 hay una sesion conectada, se realiza la desconeccion de esa sesion. <======
   -- think this means something like 'there is a connection, but we have to end it'
   elsif num_error = -24309
   then
      null;
      logout;
   elsif num_error = -1403
   then
      null;
   else
      --other error
      k_mensajes.push('Error al Ingresar '
         || to_char( num_error )
         || ', Contacte con el Administrador del Sistema'
       , 'E' );
      null;
   end if;
end;In you on-logon trigger you have entered some return statements. These will omit you last segment of code:
   if not coneccion
   then
      raise form_trigger_failure;
   end if;I don't think you want to skip this. but then again, this is a confusing segment as well:
      else
         logon(
            usu
          , pass
          , false );
         num_error := dbms_error_code;
         coneccion := false;
      end if;You make a connection but then you set the variable 'coneccion' to false. Why?
Furthermore, I am not sure that form_success gives you the info you want. It will only tell you whether the very last statement before the call to form_succes, was successfull. In your case, that is
      conec := get_application_property( connect_string );which, I believe, will not fail in your code.
Hope this helps!
Grtx
Remco

Similar Messages

  • Need help with the Vibrance adjustment in Photoshop CC 2014.

    Need help with the Vibrance adjustment in Photoshop CC 2014.
    Anytime I select Vibrance to adjust the color of an image. The whole image turns Pink in the highlights when the slider is moved from "0" to - or + in value.  Can the Vibrance tool be reset to prevent this from happening? When this happens I cn not make adjustments...just turns Pink.
    Thanks,
    GD

    Thank you for your reply. 
    Yes, that does reset to “0” and the Pink does disappear.
    But as soon as I move the slider +1 or -1 or higher the image turns Pink in all of the highlights again, rather than adjusting the overall color.
    GD
    Guy Diehl  web: www.guydiehl.com | email: [email protected]

  • I need help with the iPad Remote app to connect to apple TV 2

    I need help with the iPad Remote app to connect to apple TV 2 I have the app already on my ipad and when I open it only shows my itunes library and not the small black Apple TV 2 icon! How do i fix this and i know it's something 

    Get the manual at http://manuals.info.apple.com/en_US/AppleTV_SetupGuide.pdf
     Cheers, Tom

  • I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    Freezing, or crashing?
    ID on the Mac can produce reports that may (or may not) prove helpful in diagnosing the problem. I suspect this is something not directly related to InDesign, and maybe not to any of the Adobe apps directly since you seem to be having a problem in more than one. That often inidcates a problem at the system level.
    Nevertheless, it won't hurt to try to gather the reports. You'll find driections for how to generate them, and to post them on Pastebin.com (then put a link to them here) so we can see what's going on at Adobe Forums: InDesign CS5.5 Not Responding
    Do you happen to run a font manager? If so, which one, and waht version?

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • Need Help with the Clone Tool

    I need help with the clone tool, in that when I clone (let's say grass as example),  the new cloned area does NOT come out as sharp as the area selected.  It comes out much softer and somewhat blurred.  I have the opacity and flow both set at 100%.  This is very frustrating since I can not get a true clone.

    what "tip" do you have selected? where are you sampling from ( found in top option bar) ALSO make sure MODE is normal
    http://helpx.adobe.com/photoshop/using/retouching-repairing-images.html
    -janelle

  • I need help with the Quote applet.

    Hey all,
    I need help with the Quote applet. I downloaded it and encoded it in the following html code:
    <html>
    <head>
    <title>Part 2</title>
    </head>
    <body>
    <applet      codebase="/demo/quote/classes" code="/demo/quote/JavaQuote.class"
    width="300" height="125" >
    <param      name="bgcolor"      value="ffffff">
    <param      name="bheight"      value="10">
    <param      name="bwidth"      value="10">
    <param      name="delay"      value="1000">
    <param      name="fontname"      value="TimesRoman">
    <param      name="fontsize"      value="14">
    <param      name="link"      value="http://java.sun.com/events/jibe/index.html">
    <param      name="number"      value="3">
    <param      name="quote0"      value="Living next to you is in some ways like sleeping with an elephant. No matter how friendly and even-tempered is the beast, one is affected by every twitch and grunt.|- Pierre Elliot Trudeau|000000|ffffff|7">
    <param      name="quote1"      value="Simplicity is key. Our customers need no special technology to enjoy our services. Because of Java, just about the entire world can come to PlayStar.|- PlayStar Corporation|000000|ffffff|7">
    <param      name="quote2"      value="The ubiquity of the Internet is virtually wasted without a platform which allows applications to utilize the reach of Internet to write ubiquitous applications! That's where Java comes into the picture for us.|- NetAccent|000000|ffffff|7">
    <param      name="space"      value="20">
    </applet>
    </body>
    </html>When I previewed it in Netscape Navigator, a box with a red X appeared, and this appeared in the console when I opened it:
    load: class /demo/quote/JavaQuote.class not found.
    java.lang.ClassNotFoundException: .demo.quote.JavaQuote.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: \demo\quote\JavaQuote\class.class (The system cannot find the path specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    Exception in thread "Thread-4" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)What went wrong? and how can I make it run correct?
    Thanks,
    Nathan Pinno

    JavaQuote.class is not where your HTML says it is. That is at the relative URL "/demo/quote/".

  • I need Help with the dynamic link feature in CS3

    Hi I was wondering if anyone could help me with an issue I am having? I have the adobe cs3 master collection. Having watched tutorials on the dynamic link feature my version seems not to have the same options as those I have viewed. I wish to send my premiere video creation to encore using dynamic link, however when I click "file" and then "adobe dynamic link" the only options available are about "adobe after effects". I can export to encore however I am only alloowed to export one premiere sequence to one new encore file, I cannot create an encore file and import several premiere sequence into the same encore project. That means currently I can only have an encore creation with one premiere sequence in it, and I have no adobe dynamic link. Any help anyone could offer would be greatly appreciated.

    Thanks very much for that guys but my premiere media encoder only lets me export as: MPEG1, MPEG1-VCD, MPEG2, MPEG2 blu-ray, MPEG2-DVD, MPEG2-SVCD, H.264, H.264 blu-ray, Adobe Flash Video, Quicktime, Real Media, Windows Media. Are any of these formats DV AVI?
    Am I to export my videos direct to encore or save them elsewhere (e.g desktop). It seems that I cannot export sequences from different premiere projects to the same encore project.
    Sorry if any of these questions seem obvious, I am just new to premiere and keen to do things right from the off.
    Many thanks again guys.
    Date: Tue, 24 Nov 2009 19:32:47 -0700
    From: [email protected]
    To: [email protected]
    Subject: I need Help with the dynamic link feature in CS3
    Harm is correct.  For SD DVD, exporting as a DV AVI file from Pr will give you good results.  Encore's Automatic Transcoding will give you maximum quality for the available disc space.
    -Jeff
    >

  • HT4528 Hi  I need help with the volume on my phone  even on speaker i can barely hear who I am speaking with

    Hi I need help with the volume on my phone, even on speaker I can barely hear who I am speaking with . How do I make it louder /

    Hi there,
    I would recommend taking a look at the troubleshooting steps found in the article below.
    iPhone: Can't hear through the receiver or speakers
    http://support.apple.com/kb/ts1630
    -Griff W.

  • I am needing help with the final steps in restoring my iPod Touch 5

    I need help with the final steps in restoring my iPod

    I was told that the iPod would automatically go to restore mode when connected to wifi. It did not do that

  • I need help with the Web Application Certificate

    Greets,
    The title says it all really. I need help with the Web Application Certificate.
    I've followed the instructions from here:
    https://www.novell.com/documentation....html#b13qz9rn
    I can get as far as item 3.c
    3. Getting Your Certificate Officially Signed
    C. Select the self-signed certificate, then click File > Certification Request > Import CA Reply.
    I can get the certificate in to the Filr appliance but from there I'm stuck.
    Any help much appreciated.

    Originally Posted by bentinker
    Greets,
    The title says it all really. I need help with the Web Application Certificate.
    I've followed the instructions from here:
    https://www.novell.com/documentation....html#b13qz9rn
    I can get as far as item 3.c
    ok when you have you self signed certificate and you requested an official certificate with the corresponding CSR then you just need to go back to the digital certificates console. To import the official certificate, select the self signed certificate, then click File > Certification Request > Import CA Reply. Then a new windows pops out to select the certificate from your trusted authority from your local hard disk. Find the file (.cer worked for me) and click ok. As soon as you do this in the digital certificates console the self signed certificate will change the information that now it is officially signed. Look at the second column and you should see the name of your trusted authority under "issue from"
    I personally had a lot of issues across all platforms. Especially Firefox and Chrome for android. Needed to pack all the root cert, intermediate cert and signed cert into one file and import as CA reply. Not even sure if this is correct now. But at least it works.

  • I still need help with the Dictionary for my Nokia...

    I still need help with the Dictionary for my Nokia 6680...
    Here's the error message I get when trying to open dictionary...
    "Dictionary word information missing. Install word database."
    Can someone please provide me a link the where I could download this dictionary for free?
    Thanks!
    DON'T HIT KIDS... THEY HAVE GUNS NOW.

    oops, im sorry, i didnt realised i've already submitted it
    DON'T HIT KIDS... THEY HAVE GUNS NOW.

  • I need help with the conditional build tag option RoboHelp 10

    I need help with the conditional build tag option. I want to apply CBT to content in a topic. I looked at the Help topics and believed that I applied the feature correctly. Howver, it is not working as desired. In the 2nd sentence below I want the text highlighted in blue to only appear for the printed output and the text printed in purple to only appear for the .htm /online output. Please help.
    There are common tasks used to manage the folders in the Navigator and the folders
    in the BBS Folders Viewer Grid. For more information on these common tasks see Help
    and Support in Success Enterprise. click the links below.

    Hi there
    Using tagging is a two part process.
    Part One
    You create and apply the tags to the information you wish to control.
    Part Two
    You create a Build Expression that is used when you generate your output. The Build Expression typically reads something like: NOT Tag1 (or whatever your tag name is)
    Then when you generate and use the Build Expression, the information tagged is not included in the build.
    Cheers... Rick

  • HT5312 i need help with the security questions is there some way to get you to remind me what they were from e-mail or other wise

    I need help with the security Questions is there some way to get you to remember them by e-mail of other wise

    Read the HT5312 page that you posted from, it has instructions for how to reset them i.e. if you have a rescue email address set up on your account then steps 1 to 5 half-way down that page should give you a reset link.
    If you don't have a rescue email address then you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • Need help with the Magic Trackpad

    I really need help with my Magic Trackpad. I just got it in the mail yesterday and when I was trying to set it up, it's not responding to the "one click." In the TrackPad Settings, I managed to turn off the Secondary Click and just have the Single Click checkbox turned on. How I managed that was double clicking on the bottom right side of the trackpad, but that's if I'm lucky enough for that even to respond. I have also tried to turn off my Mac and turning it back on with the trackpad on hoping it would just turn on the default settings. This is really starting to get frustrated and I know the Magic Trackpad is really cool on fun to use because I used it plenty of times I the Apple Store. Now I do know that all the motion gestures work, the only problem I'm having is the clicking mechanism.

    The clicking mechanism is located in the lower left or right corner of the trackpad, for single-click select, or secondary (menu) select, respectively. You can also configure single finger tap to select or double-finger tap for the alternate menu selection. Watch the trackpad preference videos by clicking on each setting text.
    Here are my System Preference settings for the Magic Trackpad.
    Point & Click
    Everything checked but three finger drag.
    Secondary click configured to click or tap with two fingers.
    Scroll & Zoom
    Everything checked
    More Gestures
    Everything checked but App Exposé

Maybe you are looking for

  • Playing video AND audio through TV speakers using Mini Display to HDMI adapter

    I have a late 2011 MBP and want to hear the sound of the videos I'm running on my MBP through the speakers of my LG HDTV.  I have used a Belkin Mini DisplayPort to HDMI adapter (model f2cd021eb) plugged in to my MBP with an HDMI cable running from it

  • How do you sync more than one iphone on one computer

    how do you sync more than one iphone on one computer?

  • Messagesplit of IDOC to several XML messges

    Hello Folks, I have a following issue: I want to split an INVOICE Idoc to several XML Messages with the following condition: If INVOICE belongs to country  then the  xml message should be created.. It works only if the INVOIC.xml belongs only to one

  • Block

    Hi    Is it possibile to block that user should not be able to add freight at Document Level. Screen 'Freight Charges' should not appear in Sales Order / Delivery. Thanks

  • File to multiple IDOC(message)

    Hi I need to map file to multiple IDoc type  that means on source message have two target message . Any ideas how to achieve that Thanks in advance Regards Swatantra