Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

logout form built in function in database

Tony007Oct 26 2015 — edited Oct 26 2015

hi is there a similar  function in database as logout/login function witch is used in form

LOGOUT;

      LOGON(unserid,

            pswd||db_instance,

            FALSE);

am in oracle database 11gR2

Description

Performs the default Oracle Forms logon processing with an indicated username and password. Call this procedure from an On-Logon trigger when you want to augment default logon processing.

Syntax

PROCEDURE LOGON

(username VARCHAR2,

password VARCHAR2);

PROCEDURE LOGON

(username VARCHAR2,

password VARCHAR2,

logon_screen_on_error BOOLEAN);

Built-in Type unrestricted procedure

Enter Query Mode yes

Parameters

This Built-in takes the following arguments:

username

    

    Any valid username of up to 80 characters.

password

    

    Any valid password of up to 80 characters, including a database connect string.

logon_screen_ on_error

    

    An optional BOOLEAN parameter that, when set to TRUE (default), causes Oracle Forms to automatically display the logon screen if the logon specified fails (usually because of a incorrect username/password). When logon_screen_on_error is set to FALSE and the logon fails, the logon screen will not display and FORM_FAILURE is set to TRUE so the designer can handle the condition in an appropriate manner.

Usage Notes:

When using LOGON to connect to an OPS$ database use a slash '/' for the user.name and the database name for the password..

LOGON Restrictions

If you identify a remote database, a SQL*Net connection to that database must exist at runtime. Oracle Forms can have a primary connection to only one database at a time. However, multiple connections can be established for use in PL/SQL using the EXEC_SQL packages. Also, database links may be used to access multiple databases with a single connection.

LOGON Examples

/*

** Built-in: LOGON

** Example: Perform Oracle Forms standard logon to the ORACLE

** database. Decide whether to use Oracle Forms

** Built-in processing or a user exit by consulting a

** global flag setup at startup by the form,

** perhaps based on a parameter. This example

** uses the 'Get_Connect_Info' procedure from the

** GET_APPLICATION_PROPERTY example.

** Trigger: On-Logon

*/

DECLARE

un VARCHAR2(80);

pw VARCHAR2(80);

cn VARCHAR2(80);

BEGIN

/*

** Get the connection info

*/

Get_Connect_Info(un,pw,cn);

/*

** If at startup we set the flag to tell our form that we

** are not running against ORACLE, then call our

** appropriate MY_LOGON userexit to logon.

*/

IF :Global.Non_Oracle_Datasource = 'TRUE' THEN

User_Exit('my_logon username='||un||' password='||pw);

/*

** Otherwise, call the LOGON Built-in

*/

ELSE

/* 

** Use the following to place a slash in the username field for OPS$ logon 

*/ 

IF un IS NULL THEN

un:='/';

END IF;

IF cn IS NOT NULL THEN

LOGON(un,pw||'@'||cn);

ELSE

LOGON(un,pw);

END IF;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2015
Added on Oct 26 2015
5 comments
1,689 views