PHP Bugs  
php.net | support | documentation | report a bug | advanced search | search howto | statistics | login

go to bug id or search bugs for  

Bug #7129 I can't take the exception message for a procedure.
Submitted:11 Oct 2000 3:01am UTC Modified: 27 Nov 2000 9:50am UTC
From:acornel at nivis dot ro Assigned to:danny
Status:Closed Category:Informix related
Version:4.0.0 OS:RedHat6.1
View/Vote Developer Edit Submission

Welcome! If you don't have a SVN account, you can't do anything here. You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
SVN Username: SVN Password:
Quick Fix:
Status: Assign to:
Category:
Summary:
From: acornel at nivis dot ro
New email:
Version: OS:
New/Additional Comment:

[11 Oct 2000 3:01am UTC] acornel at nivis dot ro
I have a procedure in Informix and that procedure raise an exception at
first line, but that procedure don't return anything; only that
exception. The problem is that i can't take the exception message (
ifx_errormsg() don't return anything ). Other problem is that if i try
to make ifx_query("execute procedure proc_name") the res_id is FALSE !
Thanks.
[11 Oct 2000 3:34pm UTC] danny@php.net
Change the procedure so that it has a return value, for instance 0 = OK,
anything else is exception code.

Write an exception handler in the stored procedure that returns the
error code, and let the stored procedure return 0 when no exception is
raised.

This will let you execute an ifx_fetch_row() after the ifx_query() of
the stored procedure to retrieve the return code, and you can use the
returned column value in ifx_errormsg().

Danny
---
[27 Nov 2000 9:50am UTC] sniper@php.net
no feedback.

RSS feed | show source 

PHP Copyright © 2001-2009 The PHP Group
All rights reserved.
Last updated: Sat Nov 21 10:30:49 2009 UTC