This content has been marked as final. Show 26 replies
You could supply the login/password and DB connection in the icon itself
Have the target resemble this:
ifrun60.EXE C:\formname.fmx scott/tiger@dbstring
Hope this helps.
In windows for forms6i applications on client/server you can embedd user/pwd@connect string in shortcut for application and it'll directly open the main application form without prompting to enter user name etc.
Right click on the Forms shortcut and after the main form name, type in your default user credentials like USER/PWD@CONNECT_STRING and Apply. Then use the short cut to open the application.
Hope it helps!
Thank you but it is unsecure! Anyone can open shortcut and get the password, I wanted to embed the logon inside from's coding is it possible ?
Thanks a lot,
I alread use this method to run form but without stating connect information because it is unsecure...
Yes, it is possible.
I know of a forms application that does that very thing. You are definitely on the right track using ON-LOGON and then calling LOGON();
I can't say for sure how it is done, but it is possible, keep looking.
Thanks a lot..I tried this trigger....it doesn't make automatic logon :(
Believe me it does work (at least in Forms 6i), if I can find definitive steps I will post them, but for now don't give up.1 person found this helpful
Thank you :) your help and instant reply mean a lot for me..God bless you
Now I discovered that ON-LOGON & PRE-LOGON triggers work only when running form inside forms builder ! I just put Message ('Anything'); inside them.... when I run inside forms builder message appears, but when i run from outside using ifrun60.exe nothing appears!...Thanks
That is not true. The ON-LOGON trigger works from the runtime as well.1 person found this helpful
I just tried this and it works just fine
Create ON-LOGON trigger with just one line of code:
Make sure username, password, and database string are all correct, this ought to work for you.
but when i run from outside using ifrun60.exe nothing appearsThis sounds like your shortcut may be pointing to the wrong location. Double-check your shortcut's target and startin locations.
Thanks a lot dear, it is working now, it was conflicting with another trigger (WHEN-NEW-FORM-INSTANCE) containing LOGON procedure, :D I just removed it and everthing gone ok
God bless you
Al-Salamu Alikum We Rahmatu Allah We Barakatu,
I tried ON-LOGON & PRE-LOGON triggers and I put inside them :Sounds Strang ...!
u know Miss LoveSoul if i were u i would check the following...
1. correct user or administrator privilages or roles should be given just to make sure wheather the user is authorized to navigate to this form or not.
2.Regenerate the form using (ctl + Shift + k) to refresh the changes u made on ON-LOGON & PRE-LOGON triggers
4. Check if any un-necessary triggers, program units not related ;) :)
5.u can also try the code in Pre-Form Trigger it's just fine for this purpose.
God Bless u to what he Loves for u :)
Thanks a lot Abdetu for your valuable advices :)
I have a main form and buttons, each of them is dedicated for entrance to some department..when the project runs it needs to be connected (prompt the user) to some user to show the main window right ? I created a system administrator user which is incharge of managing users, and database maintanance, and I created my own roles (e.g sysadmin role & browser role and so on) and assigned them some system privileges.
I just wanted an automatic logon with system administrator account just to show the main window without prompting the user to enter username & password...When the user try to log to some separtment, my own connect dialoge appears asking the user to enter connect information then a checking for the username & password is made first then a latter cheking on the role if he has any to decide if he can log or not to intended department..
I'm facing a problem..I put LOGON('SYSADMIN','PASSWORD@DB') in ON-LOGON trigger to bypass logon dialog..it works well, but after showing form, any further logon operation with some user account is catched by this trigger. As a result, a logon is made with SYSADMIN account and the the rest of procedure where LOGIN occured is canceled.
I was wondering if I can disable ON-LOGON trigger after first trigger ?? I wanted this trigger to work only one time when running the project, and then disabled so i can make any login with any user account and preform the rest of the procedure to show the target form and other things..
Thanks a lot