Subject Returning SQLCODE
Author Theo Bebekis
Hi

How can I have a stored procedure returning SQLCODE
in case of an exception (ANY) inside its code back to
Delphi, using a TIBStoredProc?

Is something like the following possible?

CREATE PROCEDURE MyTableInsert ( AName VARCHAR(40) )
RETURNS ( RESULT INTEGER )
AS
BEGIN

INSERT INTO MyTable(F_NAME) VALUES ('Delphi');
RESULT = 0; /* no error */
WHEN ANY DO
BEGIN
RESULT = SQLCODE;
END

END ^

Regards
Theo

-----------------------------------
Theo Bebekis
Thessaloniki, Greece
bebekis@...
-----------------------------------