Subject Re: [firebird-support] Re: Set custom value on connection system info
Author liviuslivius
Hi.

I see no difference. You join your custom table with MON$Attachments and you are safe here because if user is not logged you have not row in mon$table.

E.g. you have table
Worker with fields
Id
Name 
Age
...
User_name


And you join

Select * from mon$attachments A inner join workers W where A.mon$user=W.user_name


Regards,
Karol Bieniaszewski

-------- Oryginalna wiadomość --------
Od: "marco andreolli drazde@... [firebird-support]" <firebird-support@yahoogroups.com>
Data: 06.02.2018 08:13 (GMT+01:00)
Do: firebird-support@yahoogroups.com
Temat: Re: [firebird-support] Re: Set custom value on connection system info

 

Hi,
I wouldn't store in a standard table because I couldn' intercept the crash or forced logoff.

If I join context var with the connection I absolute safe who are actually connected.



2018-02-05 21:16 GMT+01:00 'livius' liviuslivius@... [firebird-support] <firebird-support@yahoogroups.com>:
 

I know that you solved your problem.
But why you store ID from your custom table into context var
not oposite USER_NAME in your custom user table? Then you do not need var at all.
 
regards,
Karol Bieniaszewski
 
Sent: Monday, February 5, 2018 9:11 AM
Subject: Re: [firebird-support] Re: Set custom value on connection system info
 
 

Wow, thanks!
This is what I really wanted
 
I never known the existence of that system table.
Actually I use RDB$SET_CONTEXT for store user name and id; with this table I could know the user really logged in
 
Thanks Dmitry
 
 
2018-02-04 13:46 GMT+01:00 Dmitry Yemanov dimitr@... [firebird-support] <firebird-support@yahoogroups. com>:
 

03.02.2018 23:14, marco andreolli wrote:
>
> but RDB$SET_CONTEXT() it's not right for me, because it store
> information in actual connection (or transaction) and they can not be
> read out of this (with a monitor program for example).

It can be, via MON$CONTEXT_VARIABLES.

Dmitry