Re: Errors in stored procedure don't raise
- From: Sheshnarayan Agrawal <shagrawal@xxxxxxxxxx>
- Date: Wed, 26 Apr 2006 17:52:04 +0530
Are you calling SQLFetch/SQLExtendedFetch after executing your select
query in your ODBC application? If not then you will not see any error(i.e
-1202). Server will throw an error only when you try to fetch the data and
at that time it calculates and come to know its divide by zero error hence
an error during fetch. In case of ISQL and DBACCESS you will get an error
because it fetches also but in case of ODBC you have to fetch explicitly,
execute is not enough to get an error. Recently (few days ago) there was
similar posting in IIUG, subject "Divide by zero error doesn't raise",
please check the same more information is provided over there.
Thanks & Regards
-Shesh
Informix CSDK Team, IBM India Software Lab, Bangalore,
Office : +91-80-41055271 , Cell : +91-9341381320
Tie Line : 92-46271
agustincb <agustincb.26v990@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sent by: informix-list-bounces@xxxxxxxx
04/26/2006 03:23 PM
To
informix-list@xxxxxxxx
cc
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 INTEGER
DEFINE X INTEGER;
LET X = 0/0;
END PROCEDURE
execute procedure sp_test1() -> Fails, as expected "Attempt to divide
by 0"
execute procedure sp_test2() -> This doesn't fail, it raises no
error, it just returns no rows
The 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@xxxxxxxx
http://www.iiug.org/mailman/listinfo/informix-list
- References:
- Errors in stored procedure don't raise
- From: agustincb
- Errors in stored procedure don't raise
- Prev by Date: Re: Sun Solaris /proc Directory
- Next by Date: Re: Sun Solaris /proc Directory
- Previous by thread: Errors in stored procedure don't raise
- Next by thread: Re: Errors in stored procedure don't raise
- Index(es):
Relevant Pages
|