Page 1 of 1

Authentication:=auWindows and prompt

Posted: Sun 02 Jan 2011 12:23
by RomanVD
When I set
Authentication:=auWindows
for my MSConnection, I don't get prompt dialog to select server and database. What is the way to fix it?
For auServer that is fine.

Posted: Mon 03 Jan 2011 15:17
by AndreyZ
Hello,

In the auWindows authentication mode password and user name aren't needed. That's why we don't show the prompt dialog in this mode. To change this behaviour you should inherit you own connection class from the TMSConnection class and override the NeedPrompt method in the following way:

Code: Select all

TMyMSConn = class(TMSConnection)
protected
  function NeedPrompt: Boolean; override;
end;

function TMyCon.NeedPrompt: Boolean;
begin
  Result := LoginPrompt;
end;