ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/nongui/IBXServices.pas
(Generate patch)

Comparing ibx/trunk/runtime/nongui/IBXServices.pas (file contents):
Revision 314 by tony, Fri Apr 17 10:26:08 2020 UTC vs.
Revision 315 by tony, Thu Feb 25 11:56:36 2021 UTC

# Line 38 | Line 38 | unit IBXServices;
38   interface
39  
40   uses
41 <  Classes, SysUtils, DB, IB, IBDatabase, IBTypes, IBSQLMonitor, IBExternals, memds;
41 >  Classes, SysUtils, DB, IB, IBDatabase, IBSQLMonitor, IBExternals, IBInternals,
42 >  memds;
43  
44   type
45    TIBXCustomService = class;
# Line 2347 | Line 2348 | begin
2348   end;
2349  
2350   procedure TIBXControlService.SetDatabaseName(AValue: string);
2351 + var ServerName, aDatabaseName: AnsiString;
2352 +    Protocol: TProtocolAll;
2353 +    PortNo: AnsiString;
2354   begin
2355    if FDatabaseName = AValue then Exit;
2356    CheckServiceNotRunning;
2357 <  FDatabaseName := AValue;
2358 <  DatabaseNameChanged;
2357 >  if ParseConnectString(AValue,ServerName,aDatabaseName,Protocol,PortNo) then
2358 >  begin
2359 >    if (ServerName <> '') and (AnsiUpperCase(ServicesConnection.ServerName) <> AnsiUpperCase(ServerName)) then
2360 >      IBError(ibxeServerMismatch,[ServerName,ServicesConnection.ServerName]);
2361 >    FDatabaseName := aDatabaseName;
2362 >    DatabaseNameChanged;
2363 >  end
2364 >  else
2365 >    IBError(ibxeBadConnectString,[AValue]);
2366   end;
2367  
2368   procedure TIBXControlService.DatabaseNameChanged;
# Line 3022 | Line 3033 | begin
3033    try
3034      {extact database file spec}
3035      RegexObj.ModifierG := false; {turn off greedy matches}
3036 <    RegexObj.Expression := '[A-Z][A-Z]-V([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+) .*';
3036 >    RegexObj.Expression := '[A-Z][A-Z]-[A-Z]([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+) .*';
3037      s := Results[0].AsString;
3038      if RegexObj.Exec(s) then
3039      begin
# Line 3055 | Line 3066 | begin
3066    Connected := false;
3067    if not ParseConnectString(AValue,FServerName,aServiceName,aProtocol,FPortNo)
3068      or (aServiceName <> 'service_mgr') or (aProtocol = unknownProtocol) then
3069 <    IBError(ibxeBadConnectString, [nil]);
3069 >    IBError(ibxeBadConnectString, [AValue]);
3070    FConnectString := AValue;
3071    FProtocol := TProtocol(aProtocol);
3072   end;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines