Subject | RE: [firebird-php] Cannot create simple trigger??? |
---|---|
Author | Alan McDonald |
Post date | 2004-05-23T06:30:46Z |
you forgot the = sign
new.id= etc
but you would normally protect this by asking if ID is NULL or not first.
Just in case you've already asked for a new ID and you intend to insert this
value - don;t overwrite it with another generated value.
Alan
-----Original Message-----
From: dleec45 [mailto:dleec45@...]
Sent: Sunday, May 23, 2004 4:25 PM
To: firebird-php@yahoogroups.com
Subject: [firebird-php] Cannot create simple trigger???
I'm trying to crate some simple triggers and am getting an error that
appears that GEN_ID is not recognized. Here's the trigger:
SET TERM !! ;
CREATE TRIGGER Trg_Address_ID
FOR Address
BEFORE INSERT AS
NEW.ID GEN_ID(addr_gen_id, 1);
END !!
SET TERM ; !!
and it blows up on GEN_ID!! Isn't this the correct format?
Yahoo! Groups Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/
b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
new.id= etc
but you would normally protect this by asking if ID is NULL or not first.
Just in case you've already asked for a new ID and you intend to insert this
value - don;t overwrite it with another generated value.
Alan
-----Original Message-----
From: dleec45 [mailto:dleec45@...]
Sent: Sunday, May 23, 2004 4:25 PM
To: firebird-php@yahoogroups.com
Subject: [firebird-php] Cannot create simple trigger???
I'm trying to crate some simple triggers and am getting an error that
appears that GEN_ID is not recognized. Here's the trigger:
SET TERM !! ;
CREATE TRIGGER Trg_Address_ID
FOR Address
BEFORE INSERT AS
NEW.ID GEN_ID(addr_gen_id, 1);
END !!
SET TERM ; !!
and it blows up on GEN_ID!! Isn't this the correct format?
Yahoo! Groups Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/
b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]