php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7129 I can't take the exception message for a procedure.
Submitted: 2000-10-11 03:01 UTC Modified: 2000-11-27 09:50 UTC
From: acornel at nivis dot ro Assigned: danny (profile)
Status: Closed Package: Informix related
PHP Version: 4.0.0 OS: RedHat6.1
Private report: No CVE-ID: None
 [2000-10-11 03:01 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-11 15:34 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
---

 [2000-11-27 09:50 UTC] sniper@php.net
no feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 12:01:27 2024 UTC