Subject | Re: [firebird-support] return the number of records affected |
---|---|
Author | Thomas Steinmaurer |
Post date | 2010-02-18T14:52:44Z |
> Thank you very much, I thought that row_count was for the select.ROW_COUNT is a context variable and gets filled automatically.
>
> Then can I do something like?
>
> begin
> insert into eadatge (entidad, eadp, proceso) values (:vch_entidad, :dat_eadp, :int_proceso) returning row_count into :int_reg;
> suspend;
> end
So, for example:
begin
insert into eadatge (entidad, eadp, proceso) values (:vch_entidad,
:dat_eadp, :int_proceso);
int_reg = ROW_COUNT;
suspend;
end
will work, if e.g. int_reg is a return parameter of your stored procedure.
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/
> =========
> ¦¦ ISMAEL ¦¦
> =========
>
> ----- Original Message -----
> From: Dimitry Sibiryakov
> To: firebird-support@yahoogroups.com
> Sent: Wednesday, February 17, 2010 3:45 PM
> Subject: Re: [firebird-support] return the number of records affected
>
>
>
> 17.02.2010 19:56, Ismael L. Donis García wrote:
> > Is possible return the number of records affected by an operation of insert, update and delete of a stored procedure in FB 2.1.3?
>
> In SP you can use ROW_COUNT. In client application you can use
> appropriate method of access driver.
>
> --
> SY, SD.
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>