Pwer Trigger und Generator.
Trigger sieht so aus:
Delphi-Quellcode:
CREATE TRIGGER BI_KASSE_BONKOPF_BON_ID FOR KASSE_BONKOPF
ACTIVE BEFORE
INSERT
POSITION 0
AS
BEGIN
IF (NEW.BON_ID IS NULL) THEN
NEW.BON_ID = GEN_ID(KASSE_BONKOPF_BON_ID_GEN, 1);
END^
Grüße
TurboMagic