1 2 Previous Next 26 Replies Latest reply on Mar 19, 2011 6:26 AM by Amatu Allah Neveen Ebrahim

    Bypass logon

    835457
      Hi All,

      I'm using Oracle Forms 6i, I wanted to know if it is possible to bypass logon dialog which apperas when runnig compiled(.FMX) from outside the forms builder using Oracle Forms Runtime (ifrun60.EXE) ? I wanted some username and password (system's administrator) to be logged on automatically when I run forms using Oracle Forms Runtime.


      I tried ON-LOGON & PRE-LOGON triggers and I put inside them :

      LOGON ('USERNAME','PASSWORD@DB')

      But I still get logon dialog when I run form (.FMX) using Oracle forms runtime.

      Any idea ? Thanks in advance,





      Regards,
      LoveSoul
        • 1. Re: Bypass logon
          jl1997
          You could supply the login/password and DB connection in the icon itself

          Have the target resemble this:

          ifrun60.EXE C:\formname.fmx scott/tiger@dbstring

          Hope this helps.
          • 2. Re: Bypass logon
            ZA
            In windows for forms6i applications on client/server you can embedd user/pwd@connect string in shortcut for application and it'll directly open the main application form without prompting to enter user name etc.

            Right click on the Forms shortcut and after the main form name, type in your default user credentials like USER/PWD@CONNECT_STRING and Apply. Then use the short cut to open the application.

            Hope it helps!
            • 3. Re: Bypass logon
              835457
              Thank you but it is unsecure! Anyone can open shortcut and get the password, I wanted to embed the logon inside from's coding is it possible ?
              • 4. Re: Bypass logon
                835457
                Thanks a lot,

                I alread use this method to run form but without stating connect information because it is unsecure...
                • 5. Re: Bypass logon
                  jl1997
                  Yes, it is possible.

                  I know of a forms application that does that very thing. You are definitely on the right track using ON-LOGON and then calling LOGON();

                  I can't say for sure how it is done, but it is possible, keep looking.
                  • 6. Re: Bypass logon
                    835457
                    Thanks a lot..I tried this trigger....it doesn't make automatic logon :(
                    • 7. Re: Bypass logon
                      jl1997
                      Believe me it does work (at least in Forms 6i), if I can find definitive steps I will post them, but for now don't give up.

                      :)
                      1 person found this helpful
                      • 8. Re: Bypass logon
                        835457
                        Thank you :) your help and instant reply mean a lot for me..God bless you
                        • 9. Re: Bypass logon
                          835457
                          Now I discovered that ON-LOGON & PRE-LOGON triggers work only when running form inside forms builder ! I just put Message ('Anything'); inside them.... when I run inside forms builder message appears, but when i run from outside using ifrun60.exe nothing appears!...Thanks
                          • 10. Re: Bypass logon
                            jl1997
                            That is not true. The ON-LOGON trigger works from the runtime as well.

                            I just tried this and it works just fine

                            Create ON-LOGON trigger with just one line of code:
                            LOGON('username','password@database');
                            Make sure username, password, and database string are all correct, this ought to work for you.

                            Thanks
                            1 person found this helpful
                            • 11. Re: Bypass logon
                              jl1997
                              but when i run from outside using ifrun60.exe nothing appears
                              This sounds like your shortcut may be pointing to the wrong location. Double-check your shortcut's target and startin locations.
                              • 12. Re: Bypass logon
                                835457
                                Thanks a lot dear, it is working now, it was conflicting with another trigger (WHEN-NEW-FORM-INSTANCE) containing LOGON procedure, :D I just removed it and everthing gone ok

                                God bless you
                                • 13. Re: Bypass logon
                                  Amatu Allah Neveen Ebrahim
                                  Al-Salamu Alikum We Rahmatu Allah We Barakatu,
                                  I tried ON-LOGON & PRE-LOGON triggers and I put inside them :

                                  LOGON ('USERNAME','PASSWORD@DB')
                                  Sounds Strang ...!

                                  u know Miss LoveSoul if i were u i would check the following...

                                  1. correct user or administrator privilages or roles should be given just to make sure wheather the user is authorized to navigate to this form or not.

                                  2.Regenerate the form using (ctl + Shift + k) to refresh the changes u made on ON-LOGON & PRE-LOGON triggers

                                  4. Check if any un-necessary triggers, program units not related ;) :)

                                  5.u can also try the code in Pre-Form Trigger it's just fine for this purpose.

                                  God Bless u to what he Loves for u :)

                                  Regards,

                                  Abdetu...
                                  • 14. Re: Bypass logon
                                    835457
                                    Thanks a lot Abdetu for your valuable advices :)

                                    I have a main form and buttons, each of them is dedicated for entrance to some department..when the project runs it needs to be connected (prompt the user) to some user to show the main window right ? I created a system administrator user which is incharge of managing users, and database maintanance, and I created my own roles (e.g sysadmin role & browser role and so on) and assigned them some system privileges.

                                    I just wanted an automatic logon with system administrator account just to show the main window without prompting the user to enter username & password...When the user try to log to some separtment, my own connect dialoge appears asking the user to enter connect information then a checking for the username & password is made first then a latter cheking on the role if he has any to decide if he can log or not to intended department..

                                    I'm facing a problem..I put LOGON('SYSADMIN','PASSWORD@DB') in ON-LOGON trigger to bypass logon dialog..it works well, but after showing form, any further logon operation with some user account is catched by this trigger. As a result, a logon is made with SYSADMIN account and the the rest of procedure where LOGIN occured is canceled.

                                    I was wondering if I can disable ON-LOGON trigger after first trigger ?? I wanted this trigger to work only one time when running the project, and then disabled so i can make any login with any user account and preform the rest of the procedure to show the target form and other things..


                                    Thanks a lot
                                    1 2 Previous Next