Custom Login Form issue

Custom Login Form issue

Postby swierzbicki » Thu 19 Jan 2006 15:42


I have a small issue with my custom login dialog box (based upon your exemple).

In design time, I set the MyConnection.Server to 'localHost'
On run time , in my oncreateform event , I read registries values and in my case change the Connection.server value from 'localhost' to ''.

When I'm connecting, the lcustom ogin dialog box correctly appears but the server address is still to localhost !

So, I checked the "DoInit" method :

lbUsername.Caption := FConnectDialog.UsernameLabel;
lbPassword.Caption := FConnectDialog.PasswordLabel;
lbServer.Caption := FConnectDialog.ServerLabel;
btvalider.Caption := FConnectDialog.ConnectButton;
btannuler.Caption := FConnectDialog.CancelButton;

edServer.text:= FConnectDialog.Connection.server ;

edServer.text:= FConnectDialog.Connection.server is still set with the design time value and not the runtime value !.
Is there a way to refresh the FConnectDialog.Connection object ?
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Postby swierzbicki » Thu 19 Jan 2006 16:05

It looks like the TMyCOnnection.Server is overwriten with the latest "server hostname / ip address" stored in the registry (DBAccess.pas).

It is possible to bypass this behavior ?
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Postby Ikar » Fri 20 Jan 2006 15:04

You should use MyConnectionDialog with property StoreLogInfo set to False.
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Return to MySQL Data Access Components