Subject | Re: [firebird-support] Re: cant declare cursor in FB 1.5 |
---|---|
Author | Alexandre Benson Smith |
Post date | 2004-03-09T18:06:36Z |
At 17:52 09/03/2004 +0000, you wrote:
Create Procedure sp_Test as
declare variable wSomeField integer;
declare variable wSomeOtherField varchar(30);
begin
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;
end
end
end
You could take a look on:
Interbase 6 beta docs (http://www.ibphoenix.com/downloads/60LangRef.zip) 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.
HTH
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
----------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004
[Non-text portions of this message have been removed]
>i dont need to return a dataset, i need a CURSOR.The sintax is almost the same....
>does FireBird syntax differs from Interbase classic?
Create Procedure sp_Test as
declare variable wSomeField integer;
declare variable wSomeOtherField varchar(30);
begin
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;
end
end
end
You could take a look on:
Interbase 6 beta docs (http://www.ibphoenix.com/downloads/60LangRef.zip) 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.
HTH
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
----------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004
[Non-text portions of this message have been removed]