Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedded SQL 1

Status
Not open for further replies.

WP

Programmer
Nov 30, 1999
463
CH
Hi,

Does anyone know if I can get to the completion details of an embedded delete statement? e.g. 300 record deleted.

I am writing a purge program that has parameters Lib, file and where clause and I want write an advice record of the deletion.

W.

WP

 
Hi,

Sqlrpgle provides you with following:

SQLErrD(1) - treated as Char(4); last 4 characters of
CPF or other escape message
SQLErrD(2) - treated as Char(4); last 4 characters of
CPF or other diagnostic message
SQLErrD(3) - for Fetch, Insert, Update or Delete,
number of rows retrieved or updated
SQLErrD(4) - for Prepare, relative number indicating
resources required for execution
SQLErrD(5) - for multiple-row Fetch, contains 100 if
last available row is fetched; for Delete,
number of rows affected by referential
constraints; for Connect or Set
Connection, contains t-1 if unconnected,
0 if local and 1 if connection is remote
SQLErrD(6) - when SQLCode is 0, contains SQL
completion message id

SQLErrD(3) seems to be what you are looking for.


- - - - - - - - - - - - - - - - - -
Im three apples high, Im blue, and I really like that cold beer that should be every mans right after a hard days work!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top