Subject | Re: Allowing trigger to assign primary key |
---|---|
Author | constantijnw |
Post date | 2004-06-11T16:24:08Z |
--- In IBObjects@yahoogroups.com, Chris Wallis <cwallis@a...> wrote:
I suppose you have a trigger which pulls a generatorvalue conditionally:
IF (new.PK IS NULL) THEN
.....
You could extend this condition to
IF ((new.PK IS NULL) OR (new.PK = '')) THEN
......
and transfer a ParPK with value '' to the sp.
> I'm using a TIB_StoredProc to insert records into two tables. Thereis a
> trigger on one table to form a key value composed of a generatedvalue and
> some alpha characters. When I send the params to the TIB_StoredProc, abut my
> validation error is thrown since the key is not supposed to be null,
> trigger will handle that. How can I work around this problem?Hi Chris,
I suppose you have a trigger which pulls a generatorvalue conditionally:
IF (new.PK IS NULL) THEN
.....
You could extend this condition to
IF ((new.PK IS NULL) OR (new.PK = '')) THEN
......
and transfer a ParPK with value '' to the sp.