Subject Re: [firebird-support] Re: Connecting to Firebird database from two or more pc with same username
Author Virna Constantin
I hope I did do not a fixation by "on connect"  :D

SET TERM ^ ;
ALTER TRIGGER USER_ON ACTIVE
ON CONNECT POSITION 0
AS 
  declare variable m_gaz varchar(25);
BEGIN 
    select mon$remote_address from MON$ATTACHMENTS 
        where mon$attachment_id=current_connection
        into :m_gaz;
    rdb$set_context('USER_SESSION','Gazda',:m_gaz);
    rdb$set_context('USER_SESSION','Acces',0);
    rdb$set_context('USER_SESSION','ContEdt',0);
    rdb$set_context('USER_SESSION','Import',0);

    insert into USER_MSG (id_con,usser,roll,data_con,comm)
        values (current_connection,current_user,current_role,current_timestamp,'');
END^
SET TERM ; ^


sorry for my englesh  :(