Subject Res: Re: [IBO] (unknown)
Author Giovani - Terra
Dear Helen.

Tks for advising me of my horrendously complicated code :/, but I'm doing
my best changing codes that came from other users...
I've tried almost everything, but, ok :)))

By the way, your suggestion worked, but, it has something strange.
After the commit, in the table appears 2 records, instead of 1, like :

Cod Name Description
1 Test This is a test
2 Test This is a test

They have the same value of name and description, but with different values
of Cod (1 and 2).
It is posting 2 records, but why?
I tried with the stored procedure and with a normal method, like "Insert
into xxxxx", and no one worked.

And when I run the application again, the next code will be 4 and not 3, as
wished :/
Sorry to bother you, but, I never used trigger.

Here is my trigger:

CREATE TRIGGER POSICAOTRIGGER1 FOR TB001_POSICAO BEFORE INSERT POSITION 0 AS
BEGIN
NEW.TB001_CODIGO_POSICAO = GEN_ID(GENERATOR_POSICAO,1);
END

I know that here is not a forum of programming, but, I just need this,
eheheeheh :)

Thanks for the other answer, ok?

Best regards.

Giovani.

[Non-text portions of this message have been removed]