11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LOGON_SCREEN built-in<br />

Description<br />

Displays the default <strong>Form</strong> <strong>Builder</strong> logon screen and requests a valid username and password. Most<br />

commonly, you will include this built-in subprogram in an On-Logon trigger to connect to a non-<br />

ORACLE data source.<br />

Syntax<br />

PROCEDURE LOGON_SCREEN;<br />

Built-in Type unrestricted procedure<br />

Enter Query Mode yes<br />

Parameters<br />

none<br />

LOGON_SCREEN restrictions<br />

• You must issue a call to the LOGON built-in to create the connection to your data source.<br />

LOGON_SCREEN examples<br />

274<br />

/*<br />

** Built-in: LOGON_SCREEN<br />

** Example: Use the default <strong>Form</strong> <strong>Builder</strong> logon screen to<br />

prompt<br />

** for username and password before logging on to<br />

** the database. This uses the ’Get_Connect_Info’<br />

** procedure from the GET_APPLICATION_PROPERTY<br />

** example.<br />

*/<br />

DECLARE<br />

un VARCHAR2(80);<br />

pw VARCHAR2(80);<br />

cn VARCHAR2(80);<br />

BEGIN<br />

/*<br />

** Bring up the logon screen<br />

*/<br />

Logon_Screen;<br />

/*<br />

** Get the username, password and<br />

** connect string.<br />

*/<br />

Get_Connect_Info( un, pw, cn );<br />

/*<br />

** Log the user onto the database<br />

*/<br />

IF cn IS NOT NULL THEN<br />

LOGON(un,pw||’@’||cn);<br />

ELSE<br />

LOGON(un,pw);<br />

END IF;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!