Page 1 of 1
Auto Login
Posted: Wed 30 May 2007 15:15
by kkaal
Hi,
when I open Delphi and / or my application, I allways get the login dialog asking for user and password. I tried to circumvent that by setting Username and Password. I have also set LoginPrompt to false. But have not been successful up to now.
What else do I have to do not to get the dialog?
Thanks
Klaus
Posted: Thu 31 May 2007 07:28
by Antaeus
There are several possible resons for such behaviour:
- you have more than one TMyConnection objects in your application, and one of them has LoginPrompt set to True;
- value of the LoginPrompt property is changed to True somewhere in your application;
- connection dialog is executed explicitly in you application.
If this will not help to solve the problem, please send me a complete small sample at evgeniyD*crlab*com to demonstrate it.
Also supply me the following information:
- exact version of Delphi, C++Builder or Kylix;
- exact version of MyDAC. You can see it in the About sheet of TMyConnection Editor.
Posted: Thu 31 May 2007 14:45
by teunis
The cause can be that the property of the MyConnection is set to TRUE
Sometimes when designing a program the property is automatically set to TRUE.
In the end the Units are saved and the next time on opening it asks for a login

Posted: Fri 01 Jun 2007 07:04
by Antaeus
Yes, in some cases TMyConnection automatically becomes connected in design time (generating update commands, creating fields, etc.), however this should not lead to popping up the connection dialog when MyConnection.LoginPrompt is False.
Posted: Fri 01 Jun 2007 14:46
by Antaeus
Note, the KeepDesignConnected option of TMyConnection set to False guarantees that the application will not try to connect to database on loading, inspite of the value of the Connected property at design time.