Subject Re: [IBO] "unsupported column type" on CREATE TRIGGER
Author Helen Borrie
At 10:33 PM 11/12/2007, you wrote:
>Hi Jason,
>
>When executing the following statement in a TIBOQuery where
>"ParamCheck = True", is this supposed to work?
>
>CREATE OR ALTER TRIGGER TRI_LOG_ON_DISCONNECT
>ACTIVE ON DISCONNECT POSITION 32767
>AS
> DECLARE VARIABLE VAR_ID NUMERIC(18,0);
> DECLARE VARIABLE USER_NAME VARCHAR(31);
>BEGIN
> BEGIN
> USER_NAME = USER;
> EXECUTE PROCEDURE P_INSERTINTOIBLM$OPERATIONLOG (:USER_NAME,
>'IBLM$DATABASE_DISCONNECT', 'DISCON', NULL, NULL, NULL, NULL, NULL, NULL,
>NULL, NULL, NULL, NULL, CURRENT_TRANSACTION, rdb$get_context('SYSTEM',
>'CLIENT_ADDRESS'), rdb$get_context('SYSTEM', 'NETWORK_PROTOCOL'),
>rdb$get_context('SYSTEM', 'DB_NAME'), rdb$get_context('SYSTEM',
>'ISOLATION_LEVEL')) RETURNING_VALUES :VAR_ID;
>
>/* note, there is :VAR_ID in the above line */
>
> WHEN ANY DO
> VAR_ID = -1;
> END
>END
>
>I'm first doing a Prepare. Should IBO try to create params even though
>it's a DDL statement?

In case Jason is offline again, I'll answer this Martijn. The purpose of the Paramcheck flag is exactly so that a variable reference in a PSQL declaration will NOT be treated as a parameter when the flag is false. Always set it false for a DDL statement or script.

Helen