Subject Question about error checking
Author slsolutions2002
Hello:

I am using Interbase 6 and Delphi 5. I have a number of stored
procedured that I assumed were working correctly until I had an error
the other day. In my stored procedure I lookup a record and get some
parameters as:

(A)
SELECT FIELD1,FIELD2
FROM TABLE1
WHERE FIELD3=:XXXX
INTO :FIELDX,:FIELDY

I then do an update on another table based on the :FIELDX and :FIELDY
as:

(B)
UPDATE TABLE2
SET FIELDA =:FIELDX
WHERE FIELD4 = :FIELDY

Problem is if the SELECT (A) fails then UPDATE (B) fails but neither
returns an error.

I have looked into SQLCODE as the Language Reference shows but I get
an unknown token error plus I'm not sure SQLCODE will return an error
if SELECT (A) fails since it's not really an error. Is there a way I
can determine if SELECT (A) returned a record and if UPDATE (B)
actually updated a record?

Thanks