Subject | RE: GEN_ID Trigger |
---|---|
Author | Oliphant, Dion |
Post date | 2003-10-09T11:04:31Z |
-----Original Message-----
From: Oliphant, Dion
Sent: Thursday, October 09, 2003 10:18 AM
To: firebird-support@yahoogroups.com
Subject: GEN_ID Trigger
Hi,
I am using ADO components to connect to a Firebird database. I have created
a trigger to genrerate a unique id for a table. When appending a record to
the table using IBOConsole, the new id value is not inserted into the
relevant field, ie the trigger is not 'triggered'. It is active. Is this
normal?
CREATE TRIGGER "NEW_CONTACTS_ID" FOR "CONTACTS" ACTIVE
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
IF (NEW.OBJID IS NULL) THEN
NEW.OBJID = GEN_ID(GEN_CONTACT_ID, 1);
END
Regards,
Dion.
******************************************************************************
Hierdie e-pos het geprivilegieerde inligting wat uitsluitlik vir die
geadresseerde bedoel is. Indien u nie die bedoelde ontvanger
is nie, mag u die inhoud hiervan nie openbaar maak, kopieer
of in enige opsig publiseer nie. Die inhoud hiervan is onderhewig
aan outeursreg. Indien u hierdie e-pos per abuis ontvang, geliewe
dit uit te wis.
This e-mail contains privileged information which is exclusively
intended for the addressee. If you are not the intended addressee,
you may not disclose, copy or in any other way publish the
contents hereof which is subject to copyright. If you receive this
e-mail in error, please delete it.
******************************************************************************
[Non-text portions of this message have been removed]
From: Oliphant, Dion
Sent: Thursday, October 09, 2003 10:18 AM
To: firebird-support@yahoogroups.com
Subject: GEN_ID Trigger
Hi,
I am using ADO components to connect to a Firebird database. I have created
a trigger to genrerate a unique id for a table. When appending a record to
the table using IBOConsole, the new id value is not inserted into the
relevant field, ie the trigger is not 'triggered'. It is active. Is this
normal?
CREATE TRIGGER "NEW_CONTACTS_ID" FOR "CONTACTS" ACTIVE
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
IF (NEW.OBJID IS NULL) THEN
NEW.OBJID = GEN_ID(GEN_CONTACT_ID, 1);
END
Regards,
Dion.
******************************************************************************
Hierdie e-pos het geprivilegieerde inligting wat uitsluitlik vir die
geadresseerde bedoel is. Indien u nie die bedoelde ontvanger
is nie, mag u die inhoud hiervan nie openbaar maak, kopieer
of in enige opsig publiseer nie. Die inhoud hiervan is onderhewig
aan outeursreg. Indien u hierdie e-pos per abuis ontvang, geliewe
dit uit te wis.
This e-mail contains privileged information which is exclusively
intended for the addressee. If you are not the intended addressee,
you may not disclose, copy or in any other way publish the
contents hereof which is subject to copyright. If you receive this
e-mail in error, please delete it.
******************************************************************************
[Non-text portions of this message have been removed]