Subject Re: Execute Statement & Row_Count in SP
Author constantijnw
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 04:39 PM 18/06/2004 +0200, you wrote:
> >Hi,
> >
> >In a SP I have the following lines:
> >
> >.
> >.
> >EXECUTE STATEMENT
> >'UPDATE ATAB SET ' || UPDATECLAUSE || ' WHERE ' || WHERECLAUSE;
> >ROWSAFFECTED = ROW_COUNT;
> >.
> >.
> >
> >The DML statement works fine but ROW_COUNT returns 0 even when a
row has
> >been updated.
> >Doesn't EXECUTE STATEMENT set ROW_COUNT?
>
> No.
> The procedure doesn't know what's happening in the EXECUTE STATEMENT
> call. It doesn't have any way of knowing what is in that string at
compile
> time, so that it might set up the row_count. Even at run time, it only
> knows to send a string out to the DSQL processor: it doesn't validate
> what's in the string, other than that it is a well-formed string.
>
> Read the release notes regarding EXECUTE STATEMENT. Really, it's
just a
> useful hack. It's not the magic bullet you want it to be.
>
> Please would you refrain from repeatedly subscribing and
> unsubscribing? You cause unnecessary work for moderators, who are
> volunteers, not public servants. If you want to stop getting email,
go to
> your settings on the list's main page and set your delivery option
to "No
> email". You'll still have posting rights.

Hi Helen,

AFAIK I have unsubscribed/subscribed ONCE. Yesterday I disabled
getting emails. However, today I still received emails and
consequently I unsubscribed to stop it.
Nevertheless, it feels good knowing somebody keeps a tight line with
animals like me.

Constantijn


>
> ^heLen