Subject Re: [firebird-support] @@rowcount equivalent after executing a SP
Author Helen Borrie
At 03:40 AM 29/07/2006, you wrote:
>Hi Everyone,
>
>Do you know what is the SQL Server @@rowcount
>equivalent in Firebird.
>
>
>SQL Server Example:
>
>UPDATE TABLE1
>SET .....
>
>RETURN @@ROWCOUNT; --Returns number of rows affected
>by the previous SQL statement.

You can get ROW_COUNT as a context variable in a PSQL module and hand
the value over to an output variable. Ask on the
firebird-net-provider list if you don't know how to read the output
from an executable SP.

>I'd like to know the number of rows affected from my
>.NET application after command.ExecuteNonQuery()
>statement.

[ Note that, for DSQL the value of rows affected by a DML statement
is returned as part of the isc_info_sql_records structure. It is not
implemented as an SQL language function. It is also not available
if you are returning rows from a selectable SP (not the case here,
anyway). If you are interested to find out whether this "rows
affected" value is implemented as a property you can read after
execution, ask on the firebird-net-provider list. ]

./heLen