Re: Errors in stored procedure don't raise
Posted in 2006
How are you returning from sp_Test2() ?
J.
-----Original Message-----
From: agustincb <agustincb.26v990@no-mx.forums.yourdomain.com.au>
To: informix-list@iiug.org
Date: Wed, 26 Apr 2006 05:53:48 -0400
Subject: Errors in stored procedure don't raise
Hi, i'm using the IBM Informix ODBC driver v. 2.90 to connect to a
informix server. I have this two test procedures; the only difference
is that the second returns a value:
CREATE PROCEDURE sp_Test1()DEFINE X INTEGER;
LET X = 0/0;
END PROCEDURE
CREATE PROCEDURE sp_Test2() RETURNING INTEGERDEFINE X INTEGER;
LET X = 0/0;
END PROCEDURE
execute procedure sp_test1() -> Fails, as expected "Attempt to divideby 0"
execute procedure sp_test2() -> This doesn't fail, it raises no
error, it just returns no rowsThe same happens if i do
SELECT sp_test2() FROM systables WHERE tabid = 1
If i call the procedures from isql it behaves ok, I mean it raises the
error in both cases
Any tips?
--
agustincb
------------------------------------------------------------------------
agustincb's Profile: http://www.dbtalk.net/m129
View this thread: http://www.dbtalk.net/t302308
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
Jean Sagi
jeansagi@myrealbox.com
jeansagi@gmail.com