Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to database from oracle forms programmatically

I am using oracle forms 6i, I want to connect to database programmatically using pl/sql code

I don't want final user to insert username and password and database name when forms run like this image:

.I don't want final user to face this dialog

I used pre-form trigger like this:

begin
    execute 'connect to hr/hr@yemensoft';   
end;

But it returns with errors;

error 103 at line2, column 10 encountered the symbol "connect to hr/hr@yemensoft" when expecting one of the following: :=.(@%;

like image 587
Saddam Meshaal Avatar asked May 11 '26 19:05

Saddam Meshaal


1 Answers

You'll have to use the LOGON built-in procedure:

LOGON('hr', 'hr@yemensoft');

LOGON Built-in

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);
like image 133
localghost Avatar answered May 13 '26 07:05

localghost



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!