ISecurityPackage.PerformLogon

Syntax

PerformLogon(

AuditError: Boolean;

LogonData: ISecurityPackageLogonData;

UserCredentials: ICredentials;

[MetaKey: Integer = 0];

[ObjectKey: Integer = 0]): ISecurityConnection;

Parameters

AuditError. A parameter, indicating whether audit errors are recorded in access protocol. If the True value is passed, the respective record is added to the access protocol when an error occurs.

LogonData. The security module parameters, used when connecting.

UserCredentials. The user's credentials, used when connecting.

MetaKey. A parameter, reserved for inner use.

ObjectKey. A parameter, reserved for inner use.

Description

The PerformLogon method creates a new connection with the DB server, using the specified parameters values.

Example

Sub Main;

Var

Package: ISecurityPackage;

OracleSPLD: IPrimaryOracleSPLD;

Cred: IPasswordCredentials;

Connection: ISecurityConnection;

ColCur: IDalColumns;

Field: IDalCursorField;

Begin

Package := New StandardSecurityPackage.Create;

OracleSPLD := Package.CreateLogonData("ORCL") As IPrimaryOracleSPLD;

OracleSPLD.Scheme := "Test_Schema_ORCL";

OracleSPLD.Server := "Test_ORCL";

Cred := Package.CreateCredentials(AuthenticationMode.Password) As IPasswordCredentials;

Cred.UserName := "Test_Schema_ORCL";

Cred.Password := "Test_Schema_ORCL";

Connection := Package.PerformLogon(True, OracleSPLD, Cred);

ColCur := Connection.Columns("Table_1");

While Not ColCur.Eof Do

For Each Field In ColCur.Fields Do

Debug.WriteLine(Field.Name + " " + Field.Value);

End For;

Debug.WriteLine("");

ColCur.Next;

End While;

ColCur.Close;

End Sub Main;

After executing the example a new connection to the Test_Schema_ORCL schema, located on the Test_ORCL server, is performed with the specified credentials. System information about the Table_1 table, if there is such in this scheme, is obtained and displayed in the development environment console.

See also:

ISecurityPackage