[fpc-pascal] FBAdmin

patspiper patspiper at gmail.com
Fri Sep 14 17:48:20 CEST 2012


On 13/09/12 16:33, Ludo Brands wrote:
>> 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.
It is already quite a useful component as is. Since you are FBAdmin's 
author, and are knowledgeable in the service API, what do you recommend 
regarding the non basic admin actions? Forced Writes in particular is 
interesting as it might have to be turned off when pumping data for example.
>
> 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;

It is straight forward indeed. I had started writing similar code.

Thanks,
Stephano



More information about the fpc-pascal mailing list