Login

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloConnection > TApolloConnection Methods >

Login

Declaration

function Login: Boolean;

Description

Attempts to log in the client using the values specified by the User and Password properties. Returns True if the attempt is successful, False if not. The OnLogin event fires when this method is called.

image\tip.gif Setting the Active property to True when the User and Password properties are set is the same as calling Connect followed by Login, and is the preferred technique for logging into the server.

Delphi Example

function TForm1.ConnectToServer( sHost: String ): Boolean;

begin

 ApolloConnection1.Host := sHost; 

 Result := True; 

 try 

         ApolloConnection1.Connect; 

         ApolloConnection1.User := 'SYSDBA'; 

         ApolloConnection1.Password := 'masterkey'; 

         ApolloConnection1.Login;

 except 

         ShowMessage( 'Connection failed! ); 

 end; 

end;

 

See Also

Logout, Connect, User, Password, OnLogin