CreateCredentials(Authentication: AuthenticationMode): ICredentials;
Authentication. Authentication type that is used.
The CreateCredentials method creates account of the repository with the specified type of authentication.
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 := "TestUser";
Cred.Password := "TestUser";
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: