58 |
|
FODSMajorVersion: integer; |
59 |
|
FODSMinorVersion: integer; |
60 |
|
FUserCharSetMap: array of TCharSetMap; |
61 |
+ |
FSecDatabase: AnsiString; |
62 |
|
protected |
63 |
|
FDatabaseName: AnsiString; |
64 |
|
FRaiseExceptionOnConnectError: boolean; |
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} |
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 |
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 |
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; |