Subject | Re: [ib-support] Returning SQLCODE |
---|---|
Author | Paul Reeves |
Post date | 2001-06-12T10:37:42Z |
Theo Bebekis wrote:
meantime you will have to guess which errors you want to handle and test for
them separately. A real pain.
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further
>No. This is a known limitation and will one day be fixed, I hope. In the
> 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 ^
>
meantime you will have to guess which errors you want to handle and test for
them separately. A real pain.
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further