Subject Re: [firebird-support] Dynamic SQL Error: need help understanding
Author Thomas Steinmaurer
> I can't find the error message shown below, in any documentation. I've searched the web, and still no help. Using Firebird 2.1.3.18185, manage with IBExpert.
>
> Error Message:
>
> Invalid token.
> Dynamic SQL Error.
> SQL error code = @1.
> Token unknown - line @1, column @2.
> @1.
>
> My code snippet below. I think the problem is with the last line I included. At least it is the one highlighted by IBExpert.
>
> create or alter trigger IBE$DETA_AU for DETA
> active after update position 32767
> as
> declare variable TID integer;
> declare variable VUSER varchar(3);
> declare variable VPOS integer;
> begin
> TID = gen_id(IBE$LOG_TABLES_GEN, 1);
> VUSER = new.USER_FOR_LOGGING;
> VPOS = position('@', :VUSER);
> if (:VPOS<> 0) then VUSER = substring(VUSER from 1 to (:VPOS - 1));

If this trigger is generated by LogManager of IBExpert (at least it
looks like), then you should consider telling the IBE guys to fix that
or you could simply try our IB LogManager product, which is specialized
for logging/auditing tasks.

Sorry, could not resist. ;-)



--
With regards,

Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/

Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!