Subject | Firebird 2.0 and EXECUTE BLOCK |
---|---|
Author | Greg At ACD |
Post date | 2006-02-22T01:41:02Z |
Hi all,
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 ? ).
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]
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 ? ).
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]