Subject Re: where the generators values located?
Author Adam
Hello Apinot,

I would much rather refrain from trying to wandering around in the
system tables. Apart from not being compatible with pre 1.5 installs,
and having to declare a varchar field large enough to hold the entire
statement is there any specific reason given as to why to avoid these
statements?

Execute statement is normally used because we are lazy, but in some
cases (such as this) it is the only way you can really do it.
Obviously

Stmt = 'select Name from employee where id = ' || :employeeid;

would be a very silly thing to use an execute statement for.

The system tables do contain which generators are available, but
generator values themselves are transaction independent.

Adam



--- In firebird-support@yahoogroups.com, "jameschua1021"
<cai.haibin@g...> wrote:
> Hi Adam,
>
> Thanks for the SP you've provided I did get some ideas from it. What
> Iam trying to do is to create a before insert trigger that will
first
> choose what generator to be use depending on the value supplied on
one
> of the table's column. But I don't want to write several if
statement
> on what generator to be use base on the value.
>
> Do you have any alternative solution, because I've read from Helen's
> Firebird Book, that as much as possible try to refrain from using
the
> EXECUTE STATEMENT.
>
> Apinot
>
>
> ---