ISecuritySubjectsSearch.ExecuteSearch

Syntax

ExecuteSearch;

Description

The ExecuteSearch method searches security subjects.

Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Sea: ISecuritySubjectsSearch;
    Subjs: ISecuritySubjects;
    Subj: ISecuritySubject;
    i: integer;
Begin
    MB := MetabaseClass.Active;
    Sea := MB.Security.NewSubjectsSearch;
    Sea.NameCriteria := 
"USER*";
    Sea.SubjectCriteria(SecuritySubjectType.User) := 
True;
    Sea.SubjectCriteria(SecuritySubjectType.Group) := 
True;
    Sea.AreaIncludeDB := 
True;
    Sea.AreaIncludeNT := 
True;
    Sea.ExecuteSearch;
    Subjs := Sea.Subjects;
    
If Subjs.Count > 0 Then
        
For i := 0 To Subjs.Count - 1 Do
            Subj := Subjs.Item(i);
            Debug.WriteLine(Subj.Name + 
": " + Subj.Description);
        
End For;
    
End If;
End Sub UserProc;

After executing the example, security subjects - users and groups among domain subjects and DBMS subjects - are searched for. Name and description of the found subjects is displayed in the console.

See also:

ISecuritySubjectsSearch