Home » Developer & Programmer » Forms » LOGON function (Oracle form 12c )
|
|
|
|
Re: LOGON function [message #678325 is a reply to message #678306] |
Sun, 24 November 2019 15:30   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
OK, LOGON built-in exists, you can use it, but ... what benefit do you expect from it? I mean, what difference will it make if you login as you do it now (<Ctrl + J> and fill username, password and database) or using the LOGON?
Did you follow the example Oracle provides in Forms Online Help system?
Did you read the documentation? If you did, why did you set the last (optional) parameter to FALSE? TRUE is default and might actually help:
Forms Help, LOGON built-in, logon_screen_on_error parameter
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.
|
|
|
Re: LOGON function [message #678329 is a reply to message #678325] |
Mon, 25 November 2019 02:32   |
 |
Shiv93
Messages: 34 Registered: September 2019
|
Member |
|
|
Hi LittleFoot/BlackSwan ,
Thanks for your time in replying.
SO i have designed a login page with two inputs and a login button.
1. username
2. pwd
on click of the login button i execute the following code.
Begin
LOGON (Username, pwd || '@' || 'DB', FALSE);
IF FORM_SUCCESS THEN
call_form('new_form',HIDE,DO_REPLACE);
ELSE
MESSAGE('Unable to Connect to the form');
END IF;
END;
So now my question is on what basis the LOGON inbuilt function validates the user . Does it looks for the schema name in the DB to validate the user,because if i login with the schema name i was able to login to the form successfully.
[Updated on: Mon, 25 November 2019 02:44] Report message to a moderator
|
|
|
|
|
|
|
|
Re: LOGON function [message #679812 is a reply to message #679811] |
Tue, 31 March 2020 03:39   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Here's a walkthrough which shows what you have, what you should (and should not) do to make it work.
Connected as SCOTT, I can't select from v$session:
SQL> show user
USER is "SCOTT"
SQL> select count(*) from v$session;
select count(*) from v$session
*
ERROR at line 1:
ORA-00942: table or view does not exist
Connect as a privileged user (it is SYS in my test XE database; use your own user you use for such purposes) and grant SELECT. Note the difference!
SQL> connect sys as sysdba
Enter password:
Connected.
SQL> grant select on v$session to scott;
grant select on v$session to scott
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
SQL> grant select on v_$session to scott;
Grant succeeded.
Back to SCOTT:
SQL> connect scott
Enter password:
Connected.
SQL> select count(*) from v$session;
COUNT(*)
----------
24
SQL>
[Updated on: Tue, 31 March 2020 03:41] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: LOGON function [message #680664 is a reply to message #680655] |
Sat, 30 May 2020 11:50   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
GET_APPLICATION_PROPERTY accepts predefined set of properties. I'm not on 12c but 10g (well, not my choice, that's the way it is), and - in my version - Forms Help says that you can use USER_NLS_LANGUAGE:
Forms Help
USER_NLS_LANGUAGE Returns the current value of the language portion only of the USER_NLS_LANG environment variable defined for the form operator. If USER_NLS_LANG is not explicitly set, it defaults to the setting of NLS_LANG
Please, check your Forms Help and see what it says.
So, if you created your own variable, I don't think that built-in procedures see it just because you'd want them to. Or, if it is possible, I don't know how to do it.
A simple workaround is to create a table in the database and store your "settings" in there; then it is easy to fetch them into a form.
|
|
|
|
Goto Forum:
Current Time: Sat May 03 22:26:49 CDT 2025
|