Subject | embeded. Trigger doesn't fire? |
---|---|
Author | Sergio H. Gonzalez |
Post date | 2009-10-09T23:23:02Z |
[Firebird-2.1.2.18118-0]
Hello, this is my first embeded project, so I might be missing something. I
can't find the problem...
It's any chance that a trigger is not being fired?
I have this very simple trigger and I keep geting PK violation
-----
CREATE OR ALTER TRIGGER CONSULTAS_MC_BI0 FOR CONSULTAS_MC
ACTIVE BEFORE INSERT POSITION 0
AS
begin
if ((new.id <= 0) or (new.id is null)) then
new.id = Gen_ID(id_consultas_mc,1);
end
-----
I'm using Delphi 6 / IBDataSet, connected to a grid.
If I read the generator on the client side, everything works OK...
-----
select gen_id(ID_CONSULTAS_MC,1) as NEW_ID from RDB$DATABASE
-----
May be this is a problem between Embeded Firebird and IBX ?
thanks!
-s
Hello, this is my first embeded project, so I might be missing something. I
can't find the problem...
It's any chance that a trigger is not being fired?
I have this very simple trigger and I keep geting PK violation
-----
CREATE OR ALTER TRIGGER CONSULTAS_MC_BI0 FOR CONSULTAS_MC
ACTIVE BEFORE INSERT POSITION 0
AS
begin
if ((new.id <= 0) or (new.id is null)) then
new.id = Gen_ID(id_consultas_mc,1);
end
-----
I'm using Delphi 6 / IBDataSet, connected to a grid.
If I read the generator on the client side, everything works OK...
-----
select gen_id(ID_CONSULTAS_MC,1) as NEW_ID from RDB$DATABASE
-----
May be this is a problem between Embeded Firebird and IBX ?
thanks!
-s