Auto Login

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kkaal
Posts: 1
Joined: Sat 24 Mar 2007 16:51

Auto Login

Post by kkaal » Wed 30 May 2007 15:15

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

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 31 May 2007 07:28

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.

teunis
Posts: 48
Joined: Wed 01 Feb 2006 14:15
Location: Curacao

Post by teunis » Thu 31 May 2007 14:45

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 :lol:

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 01 Jun 2007 07:04

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 01 Jun 2007 14:46

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.

Post Reply