Subject Re: Server and application names
Author Roberto Freitas
Thank you, Helen, I'll remake my question with some more details.
I was using Delphi 7 + SQL Server, now I've changed to Delphi7 +
FireBird 1.5 + IBO
1) Using SQL Server
In Delphi program I have a TADOConnection.
It's Connection String contains some parameters, like User, Password,
Initial Catalog, etc, and a particular one that I use for my own
purposes called Application Name.
In Delphi program, before opening ADO connection, I set Application
Name equal to a string containing some variables (not only the
application name itself).
In SQL Server, there is a built-in function called APP_NAME() that
retrieves that string value. When Delphi program changes something in a
table, SQL Server fires a before update trigger and inside the trigger
I can use APP_NAME() function to know that string value and this way I
am able to know change's origin and choose between some alternatives.
2) Using FireBird 1.5 + IBO
The question is:
Has FireBird 1.5 some built-in function that allows me to act the same
way as with SQL Server ? (it should be a function that retrieves some
string value that I've setted in a Delphi program using a
TIB_Connection)


--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...>
wrote:
>
> At 11:59 AM 30/03/2006, you wrote:
> >Thank you, blescouet.
> >What is CURRENT_VARIABLE please?
>
> Looks like a slight typo here. :-)
>
> CURRENT_USER variable. You can also use just USER. Both are context
> variables that return a 31-byte string which is the username that is
> logged in (or is about to log in).
>
> e.g
>
> if (current_user = 'SRV1_ACCOUNTS') then...
>
> ./hb
>