CreateLogonData(DriverName: String): ISecurityPackageLogonData;
DriverName. DB driver identifier.
The CreateLogonData method returns an object that contains properties of the security module parameters.
The list of identifiers that can be used as a value of the DriverName parameter is given in the Summary List of Identifiers section. To check if the selected driver is supported, use the ISecurityPackage.IsCompatibleDriver method.
Sub Main;
Var
Package: ISecurityPackage;
MSSQLSPLD: IPrimaryMsSqlSPLD;
Cred: IPasswordCredentials;
Connection: ISecurityConnection;
ColCur: IDalColumns;
Field: IDalCursorField;
Begin
Package := New StandardSecurityPackage.Create;
MSSQLSPLD := Package.CreateLogonData("MSSQL2008") As IPrimaryMsSqlSPLD;
MSSQLSPLD.Database := "Test_Schema_MSSQL";
MSSQLSPLD.Server := "Test_MSSQL";
Cred := Package.CreateCredentials(AuthenticationMode.Password) As IPasswordCredentials;
Cred.UserName := "TestUser";
Cred.Password := "TestUser";
Connection := Package.PerformLogonRoleO(1, MSSQLSPLD, Cred, 0, 0);
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_MSSQL schema, located on the Test_MSSQL 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: