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

Comparing ibx/trunk/fbintf/client/FBAttachment.pas (file contents):
Revision 143 by tony, Fri Feb 23 12:11:21 2018 UTC vs.
Revision 209 by tony, Wed Mar 14 12:48:51 2018 UTC

# Line 58 | Line 58 | type
58      FODSMajorVersion: integer;
59      FODSMinorVersion: integer;
60      FUserCharSetMap: array of TCharSetMap;
61 +    FSecDatabase: AnsiString;
62    protected
63      FDatabaseName: AnsiString;
64      FRaiseExceptionOnConnectError: boolean;
# Line 129 | Line 130 | public
130    function GetConnectString: AnsiString;
131    function GetRemoteProtocol: AnsiString;
132    function GetAuthenticationMethod: AnsiString;
133 +  function GetSecurityDatabase: AnsiString;
134    function GetODSMajorVersion: integer;
135    function GetODSMinorVersion: integer;
136    {Character Sets}
# Line 252 | Line 254 | begin
254    FCharSetID := 0;
255    FRemoteProtocol := '';
256    FAuthMethod := 'Legacy_Auth';
257 +  FSecDatabase := 'Default';
258    if FODSMajorVersion > 11 then
259    begin
260      Stmt := Prepare(StartTransaction([isc_tpb_read,isc_tpb_nowait,isc_tpb_concurrency],taCommit),
261 <                    'Select MON$CHARACTER_SET_ID, MON$REMOTE_PROTOCOL, MON$AUTH_METHOD From MON$ATTACHMENTS '+
261 >                    'Select MON$CHARACTER_SET_ID, MON$REMOTE_PROTOCOL, MON$AUTH_METHOD, MON$SEC_DATABASE From MON$ATTACHMENTS, MON$DATABASE '+
262                      'Where MON$ATTACHMENT_ID = CURRENT_CONNECTION');
263      ResultSet := Stmt.OpenCursor;
264      if ResultSet.FetchNext then
265      begin
266        FCharSetID := ResultSet[0].AsInteger;
267 <      FRemoteProtocol := ResultSet[1].AsString;
268 <      FAuthMethod := ResultSet[2].AsString;
267 >      FRemoteProtocol := Trim(ResultSet[1].AsString);
268 >      FAuthMethod := Trim(ResultSet[2].AsString);
269 >      FSecDatabase := Trim(ResultSet[3].AsString);
270      end
271    end
272    else
# Line 275 | Line 279 | begin
279      if ResultSet.FetchNext then
280      begin
281        FCharSetID := ResultSet[0].AsInteger;
282 <      FRemoteProtocol := ResultSet[1].AsString;
282 >      FRemoteProtocol := Trim(ResultSet[1].AsString);
283      end
284    end
285    else
# Line 659 | Line 663 | begin
663    Result := FAuthMethod;
664   end;
665  
666 + function TFBAttachment.GetSecurityDatabase: AnsiString;
667 + begin
668 +  Result := FSecDatabase;
669 + end;
670 +
671   function TFBAttachment.GetODSMajorVersion: integer;
672   begin
673    Result := FODSMajorVersion;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines