ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/udr/source/FBUDRUtils.pas
(Generate patch)

Comparing ibx/branches/udr/udr/source/FBUDRUtils.pas (file contents):
Revision 381 by tony, Sat Jan 15 00:06:22 2022 UTC vs.
Revision 396 by tony, Thu Feb 17 11:57:23 2022 UTC

# Line 98 | Line 98 | type
98      function obtainInfoCode: Integer;
99      function getInfo(code: Integer): Pointer;
100      function setInfo(code: Integer; value: Pointer): Pointer;
101 +    function cloneAttachment: IAttachment;
102 +    function GetServiceManager: IServiceManager;
103      function HasConfigFile: boolean;
104      function ReadConfigString(Section, Ident, DefaultValue: AnsiString): AnsiString;
105      function ReadConfigInteger(Section, Ident: AnsiString; DefaultValue: integer): integer;
# Line 558 | Line 560 | begin
560    inherited Create(aController);
561    FContext := context;
562    FirebirdAPI := TFB30ClientAPI.Create(context.getMaster);
563 +  aController.StartJournaling(self);
564   end;
565  
566   function TFBUDRExternalContext.AsText: AnsiString;
# Line 632 | Line 635 | begin
635    Result := FContext.setInfo(code,value);
636   end;
637  
638 + function TFBUDRExternalContext.cloneAttachment: IAttachment;
639 + var DPB: IDPB;
640 + begin
641 +  DPB := GetFirebirdAPI.AllocateDPB;
642 +  DPB.Add(isc_dpb_user_name).setAsString(GetUserName);
643 +  DPB.Add(isc_dpb_lc_ctype).setAsString(GetClientCharSet);
644 +  Result := GetFirebirdAPI.OpenDatabase(GetDatabaseName,DPB);
645 + end;
646 +
647 + function TFBUDRExternalContext.GetServiceManager: IServiceManager;
648 + var SPB: ISPB;
649 + begin
650 +  SPB := FirebirdAPI.AllocateSPB;
651 +  SPB.Add(isc_spb_user_name).setAsString(GetUserName);
652 +  Result := GetFirebirdAPI.GetServiceManager('',Local,SPB);
653 + end;
654 +
655   function TFBUDRExternalContext.HasConfigFile: boolean;
656   begin
657    Result := Controller.HasConfigFile;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines