Subject Re: [firebird-support] Firebird 2.0 and EXECUTE BLOCK
Author Martijn Tonies
Hello Graig,

> I am trying out the FB 2.0 beta 2, and am curious about the new EXECUTE
> BLOCK feature. I can't seem to get it to work, though...
>
> My sample follows:
>
> execute block returns (ID bigint)
> as
> begin
> for select nID from MYTABLE
> into :ID do
> begin
> suspend;
> end
> end
>
> Trying this in (the latest) Database Workbench or with ISQL tells me
> that it doesn't like the :ID in the INTO statement (Dynamic SQL Error
> SQL error code = -104 Token unknown - line 5, column 8 ? ).

For one thing, Database Workbench does not yet like this :-)

Although it supports all other Firebird 2 PSQL features, it does not
yet support "execute block".

Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

> I've use the FOR SELECT syntax in many selectable stored procs before
> with great success, so I'm not sure what the issue is here...
>
> NOTE: the following very simple example works just fine:
>
> execute block returns (ID bigint)
> as
> begin
> ID = 1;
> suspend;
> end
>
> If I do any actual DB query though, then the problems come up.
>
> Any insight here would be terrific! Thx!
>
> Greg
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>