Subject | Re: where the generators values located? |
---|---|
Author | Adam |
Post date | 2005-06-03T05:56:48Z |
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:
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,first
>
> 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
> choose what generator to be use depending on the value supplied onone
> of the table's column. But I don't want to write several ifstatement
> on what generator to be use base on the value.the
>
> 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
> EXECUTE STATEMENT.
>
> Apinot
>
>
> ---