Hi,
I Use TMyConnection and TMyConnectionDialog. i copied the exacmple MyDACConnectForm. I just donot understand how it works. I have set the dialog class and when I start my application the expected custom logon dialog appears. So far so good.
But, why does the dialog appear automatically? AND how do I handle logon errors. When I donot enter a password I get an error message (EDatabase Error) and the retry mechanism does not work. Then the application crashes and I get a windows error (Windows encountered a problem ...)
Does somebody have a working example for this please?
best regards,
hans
How to handle logon failures using the connection dialog
> But, why does the dialog appear automatically?
Most possible you have connected to server from design-time. You can avoid this problem by setting MyConnection.Connected to False. Also you can set MyConnection.Options.KeepDesignConnected to False.
> AND how do I handle logon errors.
Use MyConnection.OnError event handler or overwrite TfmMyConnect.DoConnect method.
Most possible you have connected to server from design-time. You can avoid this problem by setting MyConnection.Connected to False. Also you can set MyConnection.Options.KeepDesignConnected to False.
> AND how do I handle logon errors.
Use MyConnection.OnError event handler or overwrite TfmMyConnect.DoConnect method.