Hello,
how can I change the user password for a FB 2.5 Database with Delphi?
I don´t want to read it or decode it, just have the user set a personal password.
TIA
Rolf
Set / change DB user Password with Delphi 2010 on FB 2.5
-
werkstattboss
- Posts: 20
- Joined: Fri 15 May 2009 17:53
-
AndreyZ
Hello,
You can change user password using the TIBCSecurityService component. Here is an example:Note that to change user password, you should use the SYSDBA user.
You can change user password using the TIBCSecurityService component. Here is an example:
Code: Select all
procedure TMainForm.BitBtnClick(Sender: TObject);
begin
IBCSecurityService.ClientLibrary := 'fbclient.dll';
IBCSecurityService.Username := 'SYSDBA';
IBCSecurityService.Password := 'masterkey';
IBCSecurityService.LoginPrompt := False;
IBCSecurityService.Attach;
IBCSecurityService.UserInfo.UserName := 'username';
IBCSecurityService.UserInfo.Password := 'new password';
IBCSecurityService.ModifyUser;
IBCSecurityService.Detach;
end;