Subject Re: [firebird-support] Get values from stored procedure
Author Martijn Tonies
Hi,

So, what is your question? From what I can read, the procedure
does everything you want.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com


> I have a stored procedure like this
>
> create procedure ProcedName (
> ID integer)
> returns (
> Number integer)
>
> .....
> for select Field1, Field2
> from table
> Where Field3 = :ID
> Into Var1, Var2
> do
> begin
> execute procedure Procedure2 Var1 returning values idAux;
> Number = idAux;
> suspend; *************************
> end
> .......
> end
>
> I'd like get one record for each iteraction of Suspend, but i get all
> records at finally of procedure.
> I'm working with D6 and Firebird 1.5 and the code in dephi is
>
> qry.SQL.text := 'select number from ProcedName (1000);
> qry.Open;
> while not qry.Eof do
> begin
> pbEstado.Progress := pbestado.MaxValue -
> qry.Fieldbyname('number').AsInteger;
> Application.ProcessMessages;
> qry.Next;
> end;