Larry,

I am not aware of a variable that stores the count for the last
update...although you would thing that there is/should be one.

When I do bulk updates, I normally:

SELECT COUNT(*)rest_of_the_command

To determine the number of records affected, and then I prompt the user:

SET VAR vMsg = (.xxx & 'Records will be updated. Do you want to proceed?')
DIALOG .vMsg vYesNo vEndKey YES...other_parameters

Before performing the actual update. This approach allows the user one last
chance to stop the update. For substantial updates, I will prompt the user
twice (i.e. Are you really, really sure...) before performing the update.

Javier,

Javier Valencia, PE
913-829-0888 Office
913-915-3137 Cell
913-649-2904 Fax
[email protected]

________________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence
Lustig
Sent: Thursday, August 05, 2010 1:22 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Getting count of rows affected by UPDATE.

Is there any way to get the number of rows affected by the immediately
preceding UPDATE command without have to issue a SELECT command with the
same WHERE clause?

I want to get the XX in the message "Columns have been updated in XX row(s)
in TABLENAME".  (I know I can direct the message to a file and parse the
result, I'm hoping it's available through a function call or system
variable).

--
Larry


Reply via email to