Subject | Re: [firebird-support] embeded. Trigger doesn't fire? |
---|---|
Author | Teträm Corp |
Post date | 2009-10-10T10:37:30Z |
hi,
be careful, depending on how you set up your ibdataset, you may have to
generate your value by code in your application (or through the IBX
components using the according properties) (yes, in that specific case,
triggers are useless)
Thierry
Sergio H. Gonzalez a écrit :
be careful, depending on how you set up your ibdataset, you may have to
generate your value by code in your application (or through the IBX
components using the according properties) (yes, in that specific case,
triggers are useless)
Thierry
Sergio H. Gonzalez a écrit :
>
>
> [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
>
>