Subject | Stuck with 'execute block' |
---|---|
Author | personalsoft_fabiano |
Post date | 2009-10-02T20:47:55Z |
Hi all,
I use Delphi + Zeos to access Firebird databases, and i´m not able to use execute blocks in my queries, because the tool is getting fooled by the way the parameters are typed inside the execute block.
execute block (
param1 smallint = :param1)
as
declare variable var1 smallint;
begin
select a.rdb$relation_id from rdb$database a where a.rdb$relation_id = :param1 into :var1;
suspend;
end
The problem is when it parses the SQL, it searchs for strings preceded by a : and treats them as a parameters, so in the case above it finds :param1 and :var1.
I presume there are other tools with the same problem out there. Is there some recomended workaround/fix?
Regards,
Fabiano
I use Delphi + Zeos to access Firebird databases, and i´m not able to use execute blocks in my queries, because the tool is getting fooled by the way the parameters are typed inside the execute block.
execute block (
param1 smallint = :param1)
as
declare variable var1 smallint;
begin
select a.rdb$relation_id from rdb$database a where a.rdb$relation_id = :param1 into :var1;
suspend;
end
The problem is when it parses the SQL, it searchs for strings preceded by a : and treats them as a parameters, so in the case above it finds :param1 and :var1.
I presume there are other tools with the same problem out there. Is there some recomended workaround/fix?
Regards,
Fabiano