Home » Developer & Programmer » Forms » Custom "logon" form
Custom "logon" form [message #362107] Mon, 01 December 2008 00:03 Go to next message
khalidmehz
Messages: 37
Registered: May 2008
Location: PAKISTAN
Member
Hi Experts!
I want to change the look of default login screen. is it possible? if yes kindly tell me how i can change the default login screen?
regards

[MERGED by LF]

[Updated on: Mon, 01 December 2008 03:52] by Moderator

Report message to a moderator

Re: Change default login screen [message #362108 is a reply to message #362107] Mon, 01 December 2008 00:10 Go to previous messageGo to next message
rahshar
Messages: 26
Registered: July 2006
Location: Oman
Junior Member
Yes,
You can logon with a screen which describes more suitable to your
environment

Please review the file logon.fmb this will give you idea how to over ride oracle default long screen.

Imp places to look,

when-new-form
on-loggon

at form level

Thanks and regards

rahshar@gmail.com
  • Attachment: LOGON.fmb
    (Size: 100.00KB, Downloaded 1407 times)
Logon and call a form error [message #362124 is a reply to message #362107] Mon, 01 December 2008 02:10 Go to previous messageGo to next message
khalidmehz
Messages: 37
Registered: May 2008
Location: PAKISTAN
Member
Hi Experts!
I have develop a login form. there is a username, password and connect string text items. on login button i want to login using username and password given by the user and call a form. login well but when i move to new form it shows no database connection because it dont show any data on that form. and when i press F8 it give a message Operation required database connection. what i should do to resolve this problem.
regards
Change default login screen [message #362344 is a reply to message #362108] Mon, 01 December 2008 22:42 Go to previous messageGo to next message
khalidmehz
Messages: 37
Registered: May 2008
Location: PAKISTAN
Member
Thanks a lot for your cooperation. your Logon.fmb has solve my probelms. once again I want to say thanks.
Re: Change default login screen [message #378846 is a reply to message #362108] Fri, 02 January 2009 01:48 Go to previous messageGo to next message
khalidmehz
Messages: 37
Registered: May 2008
Location: PAKISTAN
Member
I have developed a logon screen for my application. but i want to handle exception like invalid username & password or connect string is invalid i have trape the error numbers but on logon function it takes lot of time. below is code whats problem in it. thanks for your kind suggestion...


DECLARE
   v_dummy  CHAR(1) := 'N';
   v_alert  NUMBER;
   ALT NUMBER ;

BEGIN
  
   IF ( :counter < 3 ) THEN
      :counter := :counter + 1;
      Logon(:UNAME, :PWD || '@'||:CSTRING, FALSE);
        IF FORM_FAILURE THEN
		IF DBMS_ERROR_CODE = -1017 THEN
                   SET_ALERT_PROPERTY('GENERAL_ERROR_ALERT',  
                      ALERT_MESSAGE_TEXT, 'User name or password 
                                          is Incorrect') ;
		   ALT := SHOW_ALERT('GENERAL_ERROR_ALERT') ;
		   RETURN ;
		ELSIF DBMS_ERROR_CODE = -12154 THEN
		   SET_ALERT_PROPERTY('GENERAL_ERROR_ALERT', 
                   ALERT_MESSAGE_TEXT, 'Connect string is
                                       Incorrect') ;
		   ALT := SHOW_ALERT('GENERAL_ERROR_ALERT') ;
		   RETURN ;	
		END IF ;
				
	END IF ;
			
      BEGIN
         
         SELECT 'Y'
         INTO   v_dummy
         FROM   dual;
         
         IF ( v_dummy = 'Y' ) THEN
            New_Form('.\PAYROLL\FORM\HOME_PAYROLL.fmx');
         END IF;

      EXCEPTION
         WHEN Others THEN 
         MESSAGE('Login Failed'||SQLERRM) ;message(' ') ;

      END;

   ELSE
      Exit_Form;

   END IF;

END;


best regards
Khalid Mehmood
[EDITED by DJM: removed some superfluous tabs]

[Updated on: Thu, 08 January 2009 18:32] by Moderator

Report message to a moderator

Re: Change default login screen [message #378882 is a reply to message #378846] Fri, 02 January 2009 04:24 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
i have trape the error numbers but on logon function it takes lot of time

I'm not sure I understood that; what takes a lot of time? Which part of the code?


"Logon" is your function, right? What does it do? If *something* takes time, my lucky guess would be that this time is spent right in the "logon" function (i.e. form tries to log on to a database using given credentials, but fails to do so - if really takes some time, a few seconds for sure).

SELECT 'Y'
         INTO   v_dummy
         FROM   dual;
could be rewritten as
v_dummy := 'Y';


The next line is a nonsense:
IF ( v_dummy = 'Y' ) THEN
as you have just set v_dummy to 'Y'; why do you check it if you know that its value certainly is a 'Y'?
Re: Change default login screen [message #378893 is a reply to message #378882] Fri, 02 January 2009 05:34 Go to previous messageGo to next message
khalidmehz
Messages: 37
Registered: May 2008
Location: PAKISTAN
Member
i just check v_dummy for validation that i am successfully connected to database.

now the actual problem is when i provide wrong username, password and connect string but it ignore the form_failure condition. I check the code thoroughly but i cant find any problem there. when i provide wrong input it should move into if form_failure block...but it cant do like this... here is uncertain behaviour as described in oracle froms help...

regards
Khalid Mehmood
Re: Change default login screen [message #378915 is a reply to message #378893] Fri, 02 January 2009 11:08 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm not sure whether you understood what I've said: here's an SQL*Plus example:
SQL> connect a/b@c
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Warning: You are no longer connected to ORACLE.
SQL>
I have provided invalid credentials, and - on my local laptop database - it took approx. 6 seconds to get the error message. This *might* be the reason for
khalidmehz
it takes lot of time


Now, as you've said that the form never enters the IF FORM_FAILURE block, it appears that there was no failure. As you don't want to tell us what's written in the "logon" function/procedure, I don't know what happened. Though, you might try to trap an error (if any at all!) in ON-MESSAGE or ON-ERROR triggers.
Re: Change default login screen [message #378945 is a reply to message #378915] Fri, 02 January 2009 22:08 Go to previous messageGo to next message
khalidmehz
Messages: 37
Registered: May 2008
Location: PAKISTAN
Member
Logon procedure is builtin (default) procedure its not my own procedure...
now i am trying to handle it in ON-ERROR & ON-MESSAGE triggers...
Re: Change default login screen [message #378946 is a reply to message #378945] Fri, 02 January 2009 22:20 Go to previous messageGo to next message
khalidmehz
Messages: 37
Registered: May 2008
Location: PAKISTAN
Member
I have tried to handle exception in ON-ERROR or ON-MESSAGE but these triggers not fired against these exceptions... its really unexpected behaviour... my form is attached herewith....
Re: Change default login screen [message #379045 is a reply to message #378946] Sun, 04 January 2009 03:37 Go to previous messageGo to next message
rahshar
Messages: 26
Registered: July 2006
Location: Oman
Junior Member
dear Khalidmehz,

Check the attached form, it works fine

Thanks and regards

Rahaman Shariff
Re: Change default login screen [message #379287 is a reply to message #379045] Mon, 05 January 2009 23:06 Go to previous message
khalidmehz
Messages: 37
Registered: May 2008
Location: PAKISTAN
Member
Hi Rahaman Shariff!

Thanks for your kind help. The form you have send is not received properly. kindly send it again.

regards
Khalid Mehmood
Previous Topic: Populating three data blocks with two 1:N relationships
Next Topic: I need a sample application in oracle forms
Goto Forum:
  


Current Time: Mon Feb 10 02:13:24 CST 2025