[Lazarus] Reading result of a Firebird stored-procedure

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Mon Mar 7 21:13:09 CET 2011



On Mon, 7 Mar 2011, Jesus Reyes wrote:

>
>
> --- El lun 7-mar-11, Koenraad Lelong <lazarus1 at de-brouwerij.be> escribió:
>
>> De: Koenraad Lelong <lazarus1 at de-brouwerij.be>
>> Asunto: [Lazarus] Reading result of a Firebird stored-procedure
>> A: "Lazarus mailing list" <lazarus at lists.lazarus.freepascal.org>
>> Fecha: lunes, 7 de marzo de 2011, 10:24
>> Hi,
>>
>> I have a stored-procedure in Firebird, to generate a
>> primary key :
>> CREATE PROCEDURE GEN_STA_NR
>> RETURNS (
>>     STA_NR Integer )
>> AS
>> begin
>>  STA_NR=gen_id(StaffelNr_GEN, 1);
>> end^
>>
>> How do I get the result ?
>
> beside to the answers you already obtained, it seems in order a stored procedure return something you must call SUSPEND for each record.

Only if you want to return multiple records. For 1 record, the exit puts the
data on the return data stream.

Michael.


More information about the Lazarus mailing list