Re: [firebase-br] "DO SUSPEND"

Gladiston Santana via lista <[email protected]>
Newsgroups gmane.comp.db.firebase.portuguese
Message-ID <CALv8-NN9pGwqV13=iJYsOJaXv0q=yOpwYXFfT+y3jMpQ0UqFnQ@mail.gmail.com>
Se estiver dando erro na linha da exception é provavelmente porque você não
criou a exception com o nome de 'EX_BAD_SP_NAME' .

Em qua., 8 de nov. de 2023 às 07:34, Mário Reis <[email protected]>
escreveu:

> Olá bom dia Gladiston e pessoal da Lista,
> Estou com uma dificuldade, criada pela documentação oficial:
>
> https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-psql-exceptparams.html
> e prende-se exatamente com este exemplo que nem sequer compila!?:
> CREATE TRIGGER TRG_SP_CREATE BEFORE CREATE PROCEDURE
> AS
> DECLARE SP_NAME VARCHAR(255);
> BEGIN
>   SP_NAME = RDB$GET_CONTEXT('DDL_TRIGGER', 'OBJECT_NAME');
>
>   IF (SP_NAME NOT STARTING 'SP_')
>   THEN EXCEPTION EX_BAD_SP_NAME USING ('SP_', SP_NAME);
> END;
>   Ainda tentei criar o trigger como database trigger mas também não dá!
>  Tentei, na minha trigger "TRG_LIGARSE"
>  RDB$SET_CONTEXT('DDL_TRIGGER', 'OBJECT_NAME','TRG_LIGARSE' );
> SP_NAME = RDB$GET_CONTEXT('DDL_TRIGGER', 'OBJECT_NAME');
> Certamente que é um exemplo académico, quiçá, infeliz!
> Ou, quem sabe, onde me perdi?
>
>
______________________________________________
FireBase-BR (www.firebase.com.br) - Hospedado em www.locador.com.br
Para saber como gerenciar/excluir seu cadastro na lista, use: http://www.firebase.com.br/fb/artigo.php?id=1107
Para consultar mensagens antigas: http://www.firebase.com.br/pesquisa_lista.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.