Subject Re: [firebird-support] Re: Server and application names
Author Jason Dodson
I don't even know how... or why SQL server could/would/should know the name of your application. Or any database
software for that matter.

I recommend thinking about a different approach.

Jason

Roberto Freitas wrote:
> 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
>>
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>


--
The information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.