Subject Re: Custom variables
Author Adam
--- In firebird-support@yahoogroups.com, "kokok_kokok"
<kokok_kokok@y...> wrote:
>
> Are the some way to define custom variables in a session in
Firebird?
>
> Thank you

Not directly, however you could create a table like this

SessionVariable
(
Connection
Name,
Value
);

Set the PK as (Connection, Name)

Then create 3 Stored procedures to Set, Get, and Clear the particular
value.

In all of these stored procedures, you could pass in the name, the
Set would also require the value and the get would return the value.

The connection can be retrieved by referring to CURRENT_CONNECTION
inside the SP. The value may not be visible to transactions within
your connection depending on transaction type etc.

Adam