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

Comparing ibx/trunk/fbintf/client/FBServices.pas (file contents):
Revision 56 by tony, Mon Mar 6 10:20:02 2017 UTC vs.
Revision 143 by tony, Fri Feb 23 12:11:21 2018 UTC

# Line 51 | Line 51 | type
51      FFirebirdAPI: IFirebirdAPI;
52      FProtocol: TProtocol;
53      FServerName: AnsiString;
54 +    FPort: AnsiString;
55      procedure CheckServerName;
56    protected
57      FSPB: ISPB;
58      procedure InternalAttach(ConnectString: AnsiString); virtual; abstract;
59    public
60 <    constructor Create(ServerName: AnsiString; Protocol: TProtocol; SPB: ISPB);
60 >    constructor Create(ServerName: AnsiString; Protocol: TProtocol; SPB: ISPB; Port: AnsiString = '');
61      destructor Destroy; override;
62    public
63      {IServiceManager}
# Line 72 | Line 73 | type
73  
74   implementation
75  
76 < uses FBMessages, FBClientAPI;
76 > uses FBMessages, FBClientAPI, IBUtils;
77  
78   { TFBServiceManager }
79  
# Line 82 | Line 83 | begin
83      IBError(ibxeServerNameMissing, [nil]);
84   end;
85  
86 < constructor TFBServiceManager.Create(ServerName: AnsiString; Protocol: TProtocol;
87 <  SPB: ISPB);
86 > constructor TFBServiceManager.Create(ServerName: AnsiString;
87 >  Protocol: TProtocol; SPB: ISPB; Port: AnsiString);
88   begin
89    inherited Create;
90    FFirebirdAPI := FirebirdAPI; {Keep reference to interface}
91    FProtocol := Protocol;
92    FSPB := SPB;
93    FServerName := ServerName;
94 +  FPort := Port;
95    Attach;
96   end;
97  
# Line 112 | Line 114 | end;
114   procedure TFBServiceManager.Attach;
115   var ConnectString: AnsiString;
116   begin
117 <  case FProtocol of
116 <    TCP: ConnectString := FServerName + ':service_mgr'; {do not localize}
117 <    SPX: ConnectString := FServerName + '@service_mgr'; {do not localize}
118 <    NamedPipe: ConnectString := '\\' + FServerName + '\service_mgr'; {do not localize}
119 <    Local: ConnectString := 'service_mgr'; {do not localize}
120 <  end;
117 >  ConnectString := MakeConnectString(FServerName,'service_mgr',FProtocol,FPort);
118    InternalAttach(ConnectString);
119   end;
120  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines