Page 1 of 1
TMyConnection and LoginPrompt
Posted: Wed 11 Jun 2008 15:16
by scaupp
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.
Re: TMyConnection and LoginPrompt
Posted: Wed 11 Jun 2008 15:56
by eduardosic
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
Posted: Wed 11 Jun 2008 16:33
by scaupp
Well, look at that! That does it.
Thank you.
Posted: Wed 11 Jun 2008 16:41
by eduardosic
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.

Posted: Wed 11 Jun 2008 17:05
by scaupp
Yep, I definitely should have RTFMed.
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.
Posted: Wed 11 Jun 2008 17:13
by eduardosic
scaupp wrote:Yep, I definitely should have RTFMed.
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
Ps: Upgrade the mydac, version 5 is fantastic
LocalFailOver, DisconnectedModel = Good Bye LostConnection