Adsense Ad

Thursday, 11 May 2017

Oracle Forms: LOGON

LOGON Built-in

Description

Performs the default Forms Developer 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 VARCHAR2);

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 Forms Developer 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.

     Forms Developer 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 Forms Developer standard logon to the ORACLE

database. Decide whether to use Forms Developer

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);

4-385

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;

END IF; END;


3 comments:

govikadhasan p said...

logon not working in 12c forms

warda said...

Can you please assist me with figuring out something in Oracle forms and reports?

Ethan Freeman said...

Great blog yyou have here