TZSQLProcessor + Return Field

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
amonteiro
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 20.07.2022, 15:11

TZSQLProcessor + Return Field

Post by amonteiro »

Hi, i have a sql script in the Firebird 4 that is like it:

Code: Select all

EXECUTE BLOCK
RETURNS (EXISTE INTEGER)
AS
BEGIN
  EXISTE = 0;
  IF (EXISTS(SELECT 1 FROM RDB$PROCEDURES WHERE RDB$PROCEDURE_NAME = 'VEC_OBTERVERSAOEC')) THEN
     EXISTE = 1;
  SUSPEND;
END
I would like to run this sql and get the Field EXISTE in the returns. I try TZSQLProcessor but i don't know how do this. Someone know how i could do? Thanks.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: TZSQLProcessor + Return Field

Post by marsupilami »

Hmm - I am not sure but you might want to try using TZReadOnlyQuery. Put the execute block in the SQL property and call .Open. If that doesn't work, I think, it is impossible to execute this block.

Note: If you don't want to do more, you might want to simply do this:

Code: Select all

SELECT count(*) as EXISTE FROM RDB$PROCEDURES WHERE RDB$PROCEDURE_NAME = 'VEC_OBTERVERSAOEC'
Post Reply