Subject Re: [firebird-support] Re: Triggers
Author Martijn Tonies
Hi,

> Helen as per your advice I tried with the SET TRIM, I get
>
> Starting transaction...
> 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

This should work in a script runner, does FlameRobin have one?
It will not work in a DSQL runner.

> Execute time: 00:00:01.
>
> 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

Huh? What advice did I give there then?

> *** 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

There's a space between AREA_ and NEXTNO. Why
is that?

> I tried this sample in SQL Hammer I didn't get any error. Flame Robin
> is good in getting the internal commands like object oriented, but SQL
> Hammer dosn't give this, any of you could suggest any admin tool that
> gives us the internal command and work like sql Hammer where it
> handles all the quots by itself. I thank you again for the input as a
> new commer for firebird and I have a project to complete at least I
> know I am not on my own. Thank you very much.

Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com