Re: change user on forms runtime

From: Jomarlen <jomarlen_at_aol.com>
Date: 1997/10/03
Message-ID: <19971003005300.UAA12484_at_ladder01.news.aol.com>#1/1


>
>Hi,
>
>I would like to have the possibility of changing user in a running
>(multiple form) application. Can this be done

The following code will do this for you

Procedure new_login IS

t_user          VARCHAR2(30);
t_password VARCHAR2(30);
t_connect_string VARCHAR2(30);

BEGIN   Logon_Screen; -- displays default logon screen
  t_user :=  Get_Application_Property(USERNAME); 
  t_password :=  Get_Application_Property(PASSWORD); 
  t_connect_string := Get_Application_Property(CONNECT_STRING); 

  logout;
  IF t_connect_string is NULL then
    logon(t_user,t_password,TRUE);
   ELSE
    logon(t_user,t_password||'_at_'||t_connect_string,TRUE);    END IF;
END; Setting the last parameter to true causes forms to display the default login screen and handle login as per normal if username/passowrd/connect string is invalid.

Check out logon_screen in the on-line help.

Regards
John



John C. Lennon
Utility Partners Inc.
4300 West Tropicana Blvd LVO-UPL
Las Vegas NV 89103

FOR UTILITY PARTNERS EMPLOYMENT
OPPORTUNITIES VISIT www.utilpart.com

e-mail: jomarlen_at_aol.com
Web Site: http://members.aol.com/jomarlen/

The views expressed in this message
are those of the author and not
necessarily those of U.P. Inc.
and/or its employees.


to Received on Fri Oct 03 1997 - 00:00:00 CEST

Original text of this message