Subject Re: [IBO] insertSQL Help please (again)
Author Eddie Bush
I would be inclined to say it's something in your application code. Your trigger shouldn't be firing because you should have an ID assigned at that point.

Maybe you could change your trigger so that it printed something to the log when the generator fired? That would help you isolate things a little more. The generator should not be firing from the trigger ... but if you log something you should be able to tell for sure ...

Have you thought about possibly setting up your app so that you can trace the SQL it's emitting? It's one thing to trace through by hand and another to do it with tools to assist you. I would recommend setting up tracing so you can maybe tell what SQL is firing better.

Good Luck!
----- Original Message -----
From: newgen3152003
To: IBObjects@yahoogroups.com
Sent: Monday, March 08, 2004 8:04 PM
Subject: Re: [IBO] insertSQL Help please (again)


I recreated the DB with this code for the trigger(made extra sure to
clean the cache

SET TERM ^;
CREATE TRIGGER TRIG_LOCATIONS_BI FOR LOCATIONS BEFORE INSERT
AS BEGIN
IF(NEW.IDLOC IS NULL) THEN NEW.IDLOC = GEN_ID
(GEN_LOCATIONS_IDLOC,1);
END ^
SET TERM ;^

in generatorlinks the line
IDLOC=GEN_LOCATIONS_IDLOC

when I insert/post with dbnavigator, the same problem generator
increments 2, I'm getting frustated
what is wrong??? I do not have any other code executing an insert.
Isn't this the proper usage?

help


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.611 / Virus Database: 391 - Release Date: 3/4/2004

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