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 391 by tony, Wed Jan 19 13:34:42 2022 UTC vs.
Revision 392 by tony, Wed Feb 9 16:17:50 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 633 | 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 +  DPB.Add(isc_dpb_set_db_SQL_dialect).setAsByte(GetAttachment.GetSQLDialect);
645 +  Result := GetFirebirdAPI.OpenDatabase(GetDatabaseName,DPB);
646 + end;
647 +
648 + function TFBUDRExternalContext.GetServiceManager: IServiceManager;
649 + var SPB: ISPB;
650 + begin
651 +  SPB := FirebirdAPI.AllocateSPB;
652 +  SPB.Add(isc_spb_user_name).setAsString(GetUserName);
653 +  Result := GetFirebirdAPI.GetServiceManager('',Local,SPB);
654 + end;
655 +
656   function TFBUDRExternalContext.HasConfigFile: boolean;
657   begin
658    Result := Controller.HasConfigFile;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines