create a screen to login

Dicas do Oracle Forms Builder - Blocos, Itens, LOV, Canvas, Triggers, comandos, PLL, d2kwutil, FMB, Alert, menus, etc
Post Reply
edson.amorim
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 135
Joined: Thu, 04 Oct 2007 3:36 pm
Location: Belo Horizonte - MG

Dear colleague,

I created my system that only has a form. I would like to create a small screen to log in so that by clicking on the icon of the executable of my file, instead of it open that traditional Oracle screen with the login request, then open this screen that will create to my taste.
Do you have any example or better yet, can you explain to me how to do this? I will be very grateful,

Edson
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

BOTHER,

Step 1:

so that that logon screen does not appear, you must annul the trigger on-logon, of your form.
Put a null; In it.

Step 2:

Create the login screen, which by clicking a button, logs on the system.

Would this be?

Whatever, send it there.
edson.amorim
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 135
Joined: Thu, 04 Oct 2007 3:36 pm
Location: Belo Horizonte - MG

Dear Trevisoli,

Great your help, I did not know this step 1 !! Now the biggest need is what you asked me in step 2 ie; I want to create a little screen where I put the field to enter the information and click a button so much from there, appear the form for me to use the program !! ...

I thank you again,

Sincerely,

Edson
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Then Brother,

In step 2, create a form with 3 items:
User,
Password,
Bank

Pressing a button, use the built-in logon.

Select all

 
  LOGON(un,pw||'@'||cn);  
I took this stretch from the HELP of the Forms itself, where:
un = username;
PW = Password;
CN = Connection / bank;

Whatever, send it there.
edson.amorim
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 135
Joined: Thu, 04 Oct 2007 3:36 pm
Location: Belo Horizonte - MG

Dear Trevisoli,

OK !! And how do I associate this login form with the form of my program? Just just make the connection with the bank through the login form?

grateful,

Edson
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Make it the first form of your system, changing the icon properties, in the Trablaho area.

As in this example:

Select all

 
C:\oracle\dev6i\BIN\ifrun60.EXE teuform  
Where TeuForm is the login fmx, beleza?

After logged in, do you give an open_form or call_form to the next form, beleza?
edson.amorim
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 135
Joined: Thu, 04 Oct 2007 3:36 pm
Location: Belo Horizonte - MG

Dear Trevisoli,


understood !! And as I have learned things only in this topic so far !! And excuse me for this; Where am I going to use these two instructions that you just passed me? Call_Form and Open_Form?

I think with this ultimate information I conclude and return here informing that everything went well !!

Thanks,

Edson Amorim
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Brother,
No, I gave you this tip, because you falow that, after filling out user and password, it would go to another screen.
Maybe your main system screen, beleza?
For example, let's assume she calls main. FMB, after login, you give a:

Select all

 
 CALL_FORM('PRINCIPAL'); 
 
Whatever, send there.
edson.amorim
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 135
Joined: Thu, 04 Oct 2007 3:36 pm
Location: Belo Horizonte - MG

Dear Trevisolli,

Just more This: Where do I put this instruction above?

grateful,

Edson
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Then Brother,

Let us suppose that your Form1 is called main.fmb, which contains the fields:

- User;
- Password;
- Connection string (Bank);

and an OK button.

After filling this information (if correct), in the button-press button, you redirect to the initial form of your application, such as example:

Select all

 
BEGIN 
  CALL_FORM('INICIAL'); 
END; 


Whatever, send it there.
francisco.angelo
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 78
Joined: Wed, 16 Jan 2008 5:06 pm
Location: RJ
Francisco Angelo
///////////////////////////////

Good morning,

I found it interesting to do this, only when I went to do when I go
put this command on the button, the following error:

Select all

LOGON(un,pw||'@'||cn); 
The 'un' identifier must be declared

How do I declare? And so, I'll have to declare the PW and the CN também right?

Thanks.
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Then Brother ...

In this case, the un , is your user name, which will be the value of the text item you created, so that the user Enter his login, correct?

This UN, may be, for example ...

Select all

 
  :BLOCO_LOGIN.CAMPO_LOGIN; 
Whatever it sends there.
thebranco
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 61
Joined: Tue, 04 Aug 2009 7:29 pm
Location: santa cruz das palmeiras

Hi everyone, I followed all the steps here more monthly but I still can not get it still not making the connection!

grate

white
francisco.angelo
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 78
Joined: Wed, 16 Jan 2008 5:06 pm
Location: RJ
Francisco Angelo
///////////////////////////////

Hello people good night !!!

I tried to make this screen again, I made the little screen with the three fields all right. Until you get the part where you set the 'OK' button.

Inserted the trigger wen_button_pressed the code:

Select all

LOGON(un,pw||'@'||cn); 
shows me the following error: UN must be declared.
Then I did this on the 'OK' button:

Select all

DECLARE 
 
  UN VARCHAR (20); 
  PW NUMBER (20); 
  CN VARCHAR (20); 
 
BEGIN 
 
 UN := (BLOCO.CAMPO); 
 PW := (BLOCO.CAMPO); 
 CN := (BLOCO.CAMPO); 
 
LOGON(un,pw||'@'||cn);  
END;

This way compiled right without error . So when I'm going to take the test it goes to the Forms screen indicated but it does not connect to the bank ...

could tell me what's wrong and how to fix ???

Thanks.
ballboas
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 99
Joined: Thu, 02 Aug 2007 3:06 pm
Location: sp
Érico Balboa

A pergunta mais cretina é aquela que não é feita

Oops buddy, try to do this:

inside the trigger on-logon of forms, you put the code:

Select all

 
   
Default_Value( 'N', 'Global.LogScr' ) ; 
	 
  if :Global.LogScr = 'N' then 
    -- Inibe a tela de login padrão.  
    Null ; 
  else 
    LOGON(:BLOCO.USERNAME,:BLOCO.PASSWORD||'@'||:BLOCO.CONEXAO, TRUE); 
  end if; 
 
Inside the trigger when-button-pressed of ok password, you put the code:

Select all

 
  :Global.LogScr := 'S' ; 
  Execute_Trigger('ON-LOGON'); 
  :Global.LogScr := 'N' ; 
   
  OPEN_FORM('x:\caminho_do_forms\PEDIDO.FMX');  

Of course this works with all information being passed correctly , you are not treating empty fields, wrong passwords ..... if you want, forehead this way, working out, if you want to improve it with a few more treatments gives a touch, abs.
francisco.angelo
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 78
Joined: Wed, 16 Jan 2008 5:06 pm
Location: RJ
Francisco Angelo
///////////////////////////////

Po guy, it worked perfectly. thank you so much.

Only the login screen is still present, even though I put the code at the end of the button instruction:

Select all

 DO_KEY('EXIT_FORM');
the 'login' forms does not disappear:
If you have how to help, but that's the least .....

---- now can you help me again ?? -----

wanted to create some users, and that they had a time to expire the password. And I just could activate it again.
Example: The user was 30 days using the program after his password expired, he will no longer be able to connect with the bank.
then I go there in the bank or maybe for the same and reactive forms of his or change his password so much. Would you like to do this ??

Thanks.
ballboas
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 99
Joined: Thu, 02 Aug 2007 3:06 pm
Location: sp
Érico Balboa

A pergunta mais cretina é aquela que não é feita

You can try to escape her with;

Select all

 
HIDE_WINDOW('Sua_Window'); 
password control You can make a table that store user, validation date, date of creation and other information that you find it necessary,
with a select you check if the password is active, expired, finally ....

for this you will need a standard user who will log in the bank before you log in with the user q is logging, so he can check this information and validate.

Good luck, abs
ghbotti
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Thu, 27 Nov 2014 2:57 pm

Hey guys.

I'm trying to set up a login screen, I had some doubts and the above mentioned tips helped me a lot. But I have a problem that I can not solve. Below is the situation.

When I type user or the invalid password, the forms returns a window with the following message: "ORA-01017: invalid username / password; logon denied". When I click OK, it opens me that standard forms login screen (which was void on the trigger on-logon). Theme Anyway to eliminate these two screens that appears? So that I can show a message saying that the password or the user are incorrect and clicking OK back to the login screen that I created?

Thanks.

Att.
ghbotti
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Thu, 27 Nov 2014 2:57 pm

ghbotti wrote: Hello everyone.

I'm trying to set up a login screen, I had some doubts and the above mentioned tips helped me a lot. But I have a problem that I can not solve. Below is the situation.

When I type user or the invalid password, the forms returns a window with the following message: "ORA-01017: invalid username / password; logon denied". When I click OK, it opens me that standard forms login screen (which was void on the trigger on-logon). Theme Anyway to eliminate these two screens that appears? So that I can show a message saying that the password or the user are incorrect and clicking OK back to the login screen that I created?

Thanks.

Att.
I found the solution, which by the way is very simple.
In the Built in Logon, change True to False, as below, this way you will skip the default forms of the Forms, that the password or user are invalid.

Select all

LOGON(:BLOCO.USERNAME,:BLOCO.PASSWORD||'@'||:BLOCO.CONEXAO, FALSE);
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest