Board index » delphi » Adding new DB user?

Adding new DB user?

Would anyone know how to add a new user (like SYSDBA) to an
Interbase database?  Programmatically would be great.

Thanx;

Bruce

 

Re:Adding new DB user?


To create a new user, you can use  IBSecurityService component at InterBase
Admin tab

procedure TForm1.Button1Click(Sender: TObject);
begin
 with IBSecurityService1 do
  begin
  ServerName := 'Poulet';
  LoginPrompt := False;
  Params.Add('user_name=sysdba');
  Params.Add('password=masterkey');
  Active := True;
    try
      UserName := Edit1.Text;
      FirstName := Edit2.Text;
      MiddleName := Edit3.Text;
      LastName := Edit4.Text;
      UserID := StrToInt(Edit5.Text);
      GroupID := StrToInt(Edit6.Text);
      Password := Edit7.Text;
      AddUser;
    finally
    Active := False;
    end;
  end;
end;

Other Threads