Subject Re: [firebird-support] Re: cant declare cursor in FB 1.5
Author Alexandre Benson Smith
At 17:52 09/03/2004 +0000, you wrote:

>i dont need to return a dataset, i need a CURSOR.
>does FireBird syntax differs from Interbase classic?

The sintax is almost the same....

Create Procedure sp_Test as
declare variable wSomeField integer;
declare variable wSomeOtherField varchar(30);
for select SomeField, SomeOtherField from sometable into :wSomeField,
:wSomeOtherField do begin
if (SomeOtherField = 0) then begin
insert into SomeOtherTable values (:SomeField, :SomeOtherField);
delete from JustAnotherTable where SomeField = :wSomeField;

You could take a look on:

Interbase 6 beta docs ( on
page 66 has a example of a stored procedure that uses a cursor, it is
selectable, but the diference is that Selectable has a returns clause on
"create procedure statement" and uses suspend to return data to the client.


Alexandre Benson Smith
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004

[Non-text portions of this message have been removed]