Re: Errors in stored procedure don't raise



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



Relevant Pages

  • RE: ODBC-Server Middleware
    ... We have the need to use ODBC. ... see only those datasources which were configured on the server. ... animal with the combination of Sequelink and Informix though the conception ... The ODBC driver usually is used by the application. ...
    (comp.databases.informix)
  • Re: Problem connecting to Informix from Sql Server
    ... What version of the Informix CSDK or Connect are you using? ... that you are using an old one based on the version of your ODBC driver. ... My first guess is that the Informix client that you are using is not ... the latest and thus does not work properly on Windows 2003 Server. ...
    (comp.databases.informix)
  • Re: Action pass-through with a form variable Access 2003
    ... variables don't exist on the server where it will execute. ... You can use variables in a regular query that will first be processed by the ... Jet or ACCDB database engine before being handed over to the ODBC driver. ...
    (comp.databases.ms-access)
  • Re: DSNs do not display in ODBC Data Source Administrator
    ... all the other databases i.e. Sybase, SQL Server, Informix and Oracle? ... > the ODBC Data Source Administration application. ... would shortening the name of the ODBC server have any ...
    (microsoft.public.data.odbc)
  • Re: DSNs do not display in ODBC Data Source Administrator
    ... all the other databases i.e. Sybase, SQL Server, Informix and Oracle? ... > the ODBC Data Source Administration application. ... would shortening the name of the ODBC server have any ...
    (microsoft.public.sqlserver.odbc)