Subject | Re: Custom variables |
---|---|
Author | Adam |
Post date | 2005-08-23T23:37:49Z |
--- In firebird-support@yahoogroups.com, "kokok_kokok"
<kokok_kokok@y...> wrote:
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
<kokok_kokok@y...> wrote:
>Firebird?
> Are the some way to define custom variables in a session in
>Not directly, however you could create a table like this
> Thank you
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