Board index » delphi » One login for different applications ?

One login for different applications ?

Hi everybody,

I have different applicatons where the user must login to connect to the
database.
I want to change this, so that a user just login in the first
application and for the
second, ... application,  the application retrieves the login and
password from the first
application.  Do I have to write an automation project for the login ?

Any help is welcome,

Thanks
Nico

 

Re:One login for different applications ?


A while back I was having one program start another and wound up passing
the user name and password as command line arguments to the second app.
If the second program command line had no arguments then show the login,
otherwise use the args as the login and password and don't show the
login.

eg.

database1.Params.Clear;

if ParamCount > 0 then
begin
  database1.LoginPrompt := false;
  database1.Params.Add ('USER NAME=' + ParamStr(1));
  database1.Params.Add ('PASSWORD=' + ParamStr(2));
end
  database1.LoginPrompt := true;

database1.Open;

Hope this helps,
Scott

Quote
Nico wrote:

> Hi everybody,

> I have different applicatons where the user must login to connect to the
> database.
> I want to change this, so that a user just login in the first
> application and for the
> second, ... application,  the application retrieves the login and
> password from the first
> application.  Do I have to write an automation project for the login ?

> Any help is welcome,

> Thanks
> Nico

Other Threads