Subject | Re: Triggers |
---|---|
Author | mspencewasunavailable |
Post date | 2007-04-19T01:20:49Z |
--- In firebird-support@yahoogroups.com, Sivarasa Visakan
<visakan13@...> wrote:
Mockingbird Data Systems, Inc.
<visakan13@...> wrote:
>There's a blank between AREA_ and NEXTNO that shouldn't be there.
> Nando,
>
> I did what you mensioned but I get the following;
>
> Starting transaction...
> Preparing query:
> CREATE TRIGGER Tri_Area FOR AREA
> ACTIVE BEFORE INSERT
> AS
> BEGIN
> new.SEQ = GEN_ID(AREA_ NEXTNO,1) ;
> END
> *** IBPP::SQLException ***
> Context: Statement::Prepare(
> CREATE TRIGGER Tri_Area FOR AREA
> ACTIVE BEFORE INSERT
> AS
> BEGIN
> new.SEQ = GEN_ID(AREA_ NEXTNO,1) ;
> END )Visakan,
> Message: isc_dsql_prepare failed
>
> SQL Message : -104
> Invalid token
>
> Engine Code : 335544569
> Engine Message :
> Dynamic SQL Error
> SQL error code = -104
> Token unknown - line 6, column 24
> NEXTNO
>
>
> Execute time: 00:00:00.
>
> Regards
> Visakan
>
> Nando Dessena <nando@...> wrote:
> copy this *as it is* into FlameRobin's query editor:above
>
> SET TERM ^;
> CREATE TRIGGER Tri_Area FOR AREA
> ACTIVE BEFORE INSERT
> AS
> BEGIN
> new.SEQ = GEN_ID(AREA_NEXTNO,1);
> END^
> SET TERM ;^
>
> Don't select any part of it and press F4. That should work.
>
> BTW, you might be interested in knowing that FlameRobin has an
> auto-increment feature that will create triggers similar to the
> automatically.Michael D. Spence
>
> Ciao
> --
> Nando Dessena
Mockingbird Data Systems, Inc.