Hi Bill,
The number of updated, inserted or deleted rows is returned in SQLER3 or
SQLERRD(3).
Alternatively the number of updated records can be determined by executing
an GET DIAGNOSTICS statement and return the ROW_COUNT information
immediately after the update statement:
Exec SQL Get Diagnostics :NbrRowsUpd = ROW_COUNT;
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Bill
Howie
Gesendet: Monday, 15.9 2014 14:34
An: rpg400-l@xxxxxxxxxxxx
Betreff: SQL status code question
Hello all,
I have what is probably a very easy question for the group. I have an RPG
program with some embedded SQL. The SQL statement does an update to a
file. I would like to be able to capture the number of records that it
updates so that I can report on it. Is there a part of the SQL status
codes that get generated that would hold that kind of data? Any
suggestions would be greatly appreciated. Thanks!
Bill
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.