Subject Re: Allowing trigger to assign primary key
Author constantijnw
--- In, Chris Wallis <cwallis@a...> wrote:
> I'm using a TIB_StoredProc to insert records into two tables. There
is a
> trigger on one table to form a key value composed of a generated
value and
> some alpha characters. When I send the params to the TIB_StoredProc, a
> validation error is thrown since the key is not supposed to be null,
but my
> trigger will handle that. How can I work around this problem?

Hi Chris,

I suppose you have a trigger which pulls a generatorvalue conditionally:


You could extend this condition to

IF ((new.PK IS NULL) OR (new.PK = '')) THEN

and transfer a ParPK with value '' to the sp.