meta data for this page
  •  

ibec_GetUsers

The ibec_GetUsers function retrieves a list of users from the server using the IBExpert Services Manager.

Syntax

  function ibec_GetUsers(ConnectOptions : string; UserNames : variant [; FullData : variant]) : variant;

The ibec_GetUsers returns NULL if no error occured, otherwise it returns an error message.

Example 1

The UserNames parameter: the following example returns a list of users registered on the server:

  execute ibeblock
  returns (UserName varchar(100),
           FirstName varchar(100),
           MiddleName varchar(100),
           LastName varchar(100))
  as
  begin
    res = ibec_GetUsers('Server=localhost/3065; User=SYSDBA; Password=masterkey;
                         ClientLib=C:\Program Files\Firebird\Bin\fbclient.dll',
                         UserNames, FullData);
    foreach (UserNames as UserName key UserIdx) do
    begin
      s = FullData[UserIdx];
      ini = ibec_ini_Open('');
      try
        ibec_ini_SetStrings(ini, s);
 
        FirstName = ibec_ini_ReadString(ini, 'UserData', 'FirstName', '');
        MiddleName = ibec_ini_ReadString(ini, 'UserData', 'MiddleName', '');
        LastName = ibec_ini_ReadString(ini, 'UserData', 'LastName', '');
      finally
        ibec_ini_Close(ini);
      end;
      suspend;
    end
  end