Home » Developer & Programmer » Forms » Hide database password in forms shortcut (Forms, 6i, Windows XP)
Hide database password in forms shortcut [message #317856] Sun, 04 May 2008 05:23 Go to next message
manojkb
Messages: 16
Registered: March 2006
Location: Dubai
Junior Member
I am opening my login fmx from a desktop shortcut. The command in the shortcut is "c:\orant\ifrun60.exe login.fmx userid=user/password" start in folder "d:\app".

I want to hide the username and password text from the shortcut. Since I don't have the login.fmb file with me, I have created setdbpass.fmb and entered the username/password in the on-logon trigger of the setdbpass form. The code is:
logon('USER','PASSWORD'||'@'||'MY.ORCL');

Now I can open the login fmx from setdbpass form, if I create a push button and entered the code "NEW_FORM('login.fmx');" in the 'WHEN-BUTTON-TRIGGER' trigger.

My question is: I want the setdbpass form to invoke the login form without having to click any push button. Is there any way to achieve this.
Re: Hide database password in forms shortcut [message #317865 is a reply to message #317856] Sun, 04 May 2008 08:15 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why wouldn't you let users enter credentials upon opening the form? What's the problem in doing it? That's how it *should* be done - every user uses its own username/password combination and connects by specifying this information when prompted.

However, if you still want to do it another way (your way, that is), the only code of the 'setdbpass' form might be in the WHEN-NEW-FORM-INSTANCE trigger:
logon('USER','PASSWORD'||'@'||'MY.ORCL');
NEW_FORM('login');
It will perform logon and open a new form ('login') without asking anything else. End user will have no idea he/she started 'setdbpass' form at all.
(SOLVED) Hide database password in forms shortcut [message #317919 is a reply to message #317865] Sun, 04 May 2008 23:32 Go to previous messageGo to next message
manojkb
Messages: 16
Registered: March 2006
Location: Dubai
Junior Member
Thanks for the reqply. I tried it already. But the problem was the screen disappeared as soon as I open the form. Finally I found out that I should create at least one (dummy) block in the canvas. This way I solved the problem. Thanks again for your input.

small correction: the logon code should be in the ON-LOGON trigger.

[Updated on: Sun, 04 May 2008 23:44]

Report message to a moderator

Re: (SOLVED) Hide database password in forms shortcut [message #317921 is a reply to message #317919] Sun, 04 May 2008 23:57 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, I put it into the WHEN-NEW-FORM-INSTANCE trigger; also, my test form did contain a block. And yes, it did the job.
Re: (SOLVED) Hide database password in forms shortcut [message #344955 is a reply to message #317921] Tue, 02 September 2008 00:25 Go to previous messageGo to next message
Derek N
Messages: 80
Registered: September 2002
Member
Out of curiosity assuming i have a shortcut setup with the username/password@xxxxx.world, but I only want to display the username and allow the user to enter his password. Ie. user double clicks on the icon and the login box pops up with the username and database already displayed. He then enters his password only and logs in. Is this possible with forms 6i
Re: (SOLVED) Hide database password in forms shortcut [message #344999 is a reply to message #344955] Tue, 02 September 2008 02:19 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Yes. Just use 'username/@xxxxx.world' and the login box will appear.

David
Re: (SOLVED) Hide database password in forms shortcut [message #345112 is a reply to message #344955] Tue, 02 September 2008 06:07 Go to previous messageGo to next message
Derek N
Messages: 80
Registered: September 2002
Member
Thanks for the info DJMartin.
Re: (SOLVED) Hide database password in forms shortcut [message #345846 is a reply to message #345112] Fri, 05 September 2008 01:20 Go to previous messageGo to next message
Derek N
Messages: 80
Registered: September 2002
Member
David, I had some time so I tried using 'username/@xxxx.world' in the shortcut.

This is what I have in my Target line of my shortcut: C:\Oracle\dev6i\BIN\ifrun60.EXE F:\FINANCE\RELEASE\logonmenu.fmx "CLERK1/@test.world"

When using the shortcut I now get the following error:
FRM-40735 ON-ERROR trigger raised unhandled exception ORA-03114.

I then clik 'OK' and it takes me to the logon box with the username and database values already inserted.

How do I eradicate the above error message and take me directly to the logon box

I was reading something about DDE packages that Oracle uses for server connections etc. Do I have to change one of the packages?

Thanks

[Updated on: Fri, 05 September 2008 01:21]

Report message to a moderator

Re: (SOLVED) Hide database password in forms shortcut [message #345848 is a reply to message #345846] Fri, 05 September 2008 01:25 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Determine the EXACT line that is failing and the data that it is trying to process.

Put 'message;pause;' pairs throughout your form. Especially in the When-New-Form-Instance and On-Error triggers. In the message text, display the data that is being received and processed by your form.

David
Previous Topic: Data block source question
Next Topic: help.adding values to LOV at runtime.
Goto Forum:
  


Current Time: Thu Dec 08 12:18:05 CST 2016

Total time taken to generate the page: 0.09015 seconds