[fpc-pascal] FBAdmin

Ludo Brands ludo.brands at free.fr
Thu Sep 13 15:33:08 CEST 2012


> A few questions regarding FBAdmin:
> 
> - Will FBAdmin be backported to 2.6.1?
>
I can't comment on that.
 
> - Will more functionality be added to it? In particular the 
> setting of 
> Forced Writes (I could perhaps supply a patch then).
> 

Not from my side. Purpose of TFBAdmin was to provide access to the
"day-to-day" basic admin tasks such as backup/restore, user management. The
API has many more options that are not basic admin actions and that require
a minimum of knowledge and precaution. Making those available in a standard
component is opening a can of worms.

The code itself is quite straightforward. Copy fbadmin to your project dir
and add the following: 

function TFBAdmin.SetForcedWrites(Database:string; ForcedWrites: boolean):
boolean;
var
  spb:string;
begin
  result:=CheckConnected('SetForcedWrites');
 
spb:=chr(isc_action_svc_properties)+IBSPBParamSerialize(isc_spb_dbname,Datab
ase)+
    chr(isc_spb_prp_write_mode);
  if ForcedWrites then
    spb:=spb+chr(isc_spb_prp_wm_sync)
  else
    spb:=spb+chr(isc_spb_prp_wm_async);
  result:=isc_service_start(@FStatus[0], @FSvcHandle, nil, length(spb),
    @spb[1])=0;
  if not result then
    begin
    CheckError('SetForcedWrites',FStatus);
    exit;
    end;
end;



Ludo




More information about the fpc-pascal mailing list