TMyConnection and LoginPrompt

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
scaupp
Posts: 7
Joined: Tue 12 Dec 2006 14:27

TMyConnection and LoginPrompt

Post by scaupp » Wed 11 Jun 2008 15:16

Using MyDAC 2.0 under Delphi 5. With a TMyConnection component I set LoginPrompt to True and leave Username and Password blank (as I don't want to store them with the Delphi source). When I call TMyConnection.Connect (or set TMyConnection.Connected := True) a permission denied for the server is generated as if the connection is being attempted with an invalid password. Why doesn't TMyConnection prompt for username and password before attempting to connect (as it does in the IDE when you change Connected to True in the Object Inspector)?

As an aside, I tried searching the forums for TMyConnection AND LoginPrompt. Of the 19 results returned not one of them contained either of those words. Isn't that strange?

Thanks.

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Re: TMyConnection and LoginPrompt

Post by eduardosic » Wed 11 Jun 2008 15:56

scaupp wrote:Using MyDAC 2.0 under Delphi 5. With a TMyConnection component I set LoginPrompt to True and leave Username and Password blank (as I don't want to store them with the Delphi source). When I call TMyConnection.Connect (or set TMyConnection.Connected := True) a permission denied for the server is generated as if the connection is being attempted with an invalid password. Why doesn't TMyConnection prompt for username and password before attempting to connect (as it does in the IDE when you change Connected to True in the Object Inspector)?

As an aside, I tried searching the forums for TMyConnection AND LoginPrompt. Of the 19 results returned not one of them contained either of those words. Isn't that strange?

Thanks.
try to add MyDACVcl unit in uses

scaupp
Posts: 7
Joined: Tue 12 Dec 2006 14:27

Post by scaupp » Wed 11 Jun 2008 16:33

Well, look at that! That does it.

Thank you.

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Post by eduardosic » Wed 11 Jun 2008 16:41

scaupp wrote:Well, look at that! That does it.

Thank you.
Ok, see MyDAC Help and FAQ.

Code: Select all

Some questions about the visual part of MyDAC

The following situations usually arise from the same problem:


·I set the Debug property to True but nothing happens!
·While executing a query, the screen cursor does not change to an hour-glass.
·Even if I have LoginPromp set to True, the connect dialog does not appear.

To fix this, you should add the MyDacVcl (for Windows) or MyDacClx (for Linux) unit to the uses clause of your project.

:D

scaupp
Posts: 7
Joined: Tue 12 Dec 2006 14:27

Post by scaupp » Wed 11 Jun 2008 17:05

Yep, I definitely should have RTFMed. :oops:

The only defense I can offer is that I did look at the FAQ here, but didn't make the connection with "Visual" and what I was trying to do. I also tried searching the forums with no success.

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Post by eduardosic » Wed 11 Jun 2008 17:13

scaupp wrote:Yep, I definitely should have RTFMed. :oops:

The only defense I can offer is that I did look at the FAQ here, but didn't make the connection with "Visual" and what I was trying to do. I also tried searching the forums with no success.
Without problems, we are a great family
:D

Ps: Upgrade the mydac, version 5 is fantastic

LocalFailOver, DisconnectedModel = Good Bye LostConnection

Post Reply