Subject | Re: [firebird-support] Re: Triggers |
---|---|
Author | Helen Borrie |
Post date | 2007-04-18T13:39:02Z |
At 11:17 PM 18/04/2007, you wrote:
TERM. But Nando (who is one of the developers of FlameRobin) said
FlameRobin would accept it (in a script, of course).
legal identifier, while AREA_ NEXTNO is not.
./heLen
>Thank you all the input,Nope, that was Adam's advice. My advice was NOT to use SET
>
>Helen as per your advice I tried with the SET TRIM, I get
TERM. But Nando (who is one of the developers of FlameRobin) said
FlameRobin would accept it (in a script, of course).
>Starting transaction...That is because SET TERM is not a dynamic SQL statement.
>Preparing query: >SET TERM ^
>*** IBPP::SQLException ***
>Context: Statement::Prepare( >SET TERM ^ )
>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 1, column 1
>Execute time: 00:00:01.That is because you have a space before NEXTNO. So AREA_NEXTNO is a
>
>Martijn as per your advice I get:
>
>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
> )
>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 7, column 24
>NEXTNO
legal identifier, while AREA_ NEXTNO is not.
>I tried this sample in SQL Hammer I didn't get any error.You probably typed it correctly in SQLHammer. :-)
./heLen