Subject | RE: [firebird-support] How to get CURRENT_USER? |
---|---|
Author | Clay Shannon |
Post date | 2005-02-14T20:53:13Z |
<< it's USER
Alan>>
USER and CURRENT_USER are apparently the same. I don't know why there are
two context variables for the same thing, unless it's just to make the newer
one (CURRENT_USER) compatible with other context variables, such as
CURRENT_ROLE, etc.
What I've done is write a temporary record to a table that holds the
CURRENT_USER and CURRENT_ROLE values, immediately retrieve them and assign
them to global vars (properties), and then delete the record (there is
always 0 or 1 record in the table, and the time there is a record in the
table is just a fraction of a second.
I then have those values throughout the run of the app, in case I want to
report "who dunnit" re: who ran the app for the first time or who attempted
to break the password, etc.
Clay Shannon,
Dimension 4 Software
-----Original Message-----
From: Alan McDonald [mailto:alan@...]
Sent: Monday, February 14, 2005 2:47 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] How to get CURRENT_USER?
Alan
Yahoo! Groups Links
Alan>>
USER and CURRENT_USER are apparently the same. I don't know why there are
two context variables for the same thing, unless it's just to make the newer
one (CURRENT_USER) compatible with other context variables, such as
CURRENT_ROLE, etc.
What I've done is write a temporary record to a table that holds the
CURRENT_USER and CURRENT_ROLE values, immediately retrieve them and assign
them to global vars (properties), and then delete the record (there is
always 0 or 1 record in the table, and the time there is a record in the
table is just a fraction of a second.
I then have those values throughout the run of the app, in case I want to
report "who dunnit" re: who ran the app for the first time or who attempted
to break the password, etc.
Clay Shannon,
Dimension 4 Software
-----Original Message-----
From: Alan McDonald [mailto:alan@...]
Sent: Monday, February 14, 2005 2:47 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] How to get CURRENT_USER?
> I want to insert a record into a table whenever a user runs an app for theit's USER
> first time. To check this, I want to see if there is a record
> containing the
> name of the app and the name of the user. How can I retrieve the
> CURRENT_USER context variable so that I can pass that as an arg to see if
> such a record exists?
>
>
>
> IOW, I want to do something like:
>
>
>
> If IsFirstTimeUser(AAppName, AUserName: String) then
>
> InsertRecord(AUserName, etc.)
>
>
>
> The AUserName arg to passed should be CURRENT_USER.
>
>
>
> Clay Shannon,
Alan
Yahoo! Groups Links