Subject | Re: [IBO] Problems with transaction |
---|---|
Author | Helen Borrie |
Post date | 2004-04-24T06:13:38Z |
At 05:41 AM 24/04/2004 +0000, you wrote:
TB001_CODIGO_POSICAO, because a PK field is NOT NULL. Does it use a
generator? If so, you need to use GeneratorLinks.
TB001_CODIGO_POSICAO=name_of_generator
And you need to have a Before Insert trigger on your table, like this:
create trigger AI_MYTABLE
active before insert
as
begin
if (TB001_CODIGO_POSICAO is null) then
TB001_CODIGO_POSICAO = gen_id(name_of_generator, 1);
end
Helen
>Project Futebol.exe raised exception class EIB_DATASETERROR withThat means you need to take care of ensuring that there is a value for
>message "TB001_CODIGO_POSICAO is a required field". Process stopped.
>Use Step or Run to continue.
>
>This error happens when i'm inserting data. When i'm updating data,
>no error occur.
>This field (TB001_CODIGO_POSICAO) is a PkField on the Table.
>
>
>I have no idea what to do :/
>
>If you could help, i'd appreciate.
TB001_CODIGO_POSICAO, because a PK field is NOT NULL. Does it use a
generator? If so, you need to use GeneratorLinks.
TB001_CODIGO_POSICAO=name_of_generator
And you need to have a Before Insert trigger on your table, like this:
create trigger AI_MYTABLE
active before insert
as
begin
if (TB001_CODIGO_POSICAO is null) then
TB001_CODIGO_POSICAO = gen_id(name_of_generator, 1);
end
Helen