I am moving to php-4.2.1 now and still looking for explanation how to use exeption handling in informix stored procedures. As I've wrote a year ago here, when I trying to execute the following php code:
<? $connid=ifx_connect("basename","username","password" ); $q="execute procedure test()"; $i=ifx_query($q,$connid); echo( ifx_errormsg() ); ifx_free_result($i); ?> and stored procedure is: CREATE PROCEDURE TEST() RAISE EXCEPTION -746, 0, "testing..."; END PROCEDURE I expect to see "testting..." but see nothing. After applaying patch the code work fine. --- ifx.ec.original Mon Jun 3 19:02:27 2002 +++ ifx.ec Wed Jun 5 10:07:10 2002 @@ -756,6 +756,7 @@ int cursoryproc; int argc=ZEND_NUM_ARGS(); long ifx_type; + char errmsg746[72]; if(argc < 2 || zend_get_parameters_ex(argc, &query, &ifx_link, &dummy, &dummy)==FAILURE) { WRONG_PARAM_COUNT; @@ -921,8 +922,10 @@ if (ifx_check() < 0) { IFXG(sv_sqlcode) = SQLCODE; + strcpy(errmsg746, sqlca.sqlerrm); EXEC SQL DEALLOCATE DESCRIPTOR :descrpid; EXEC SQL free :statemid; + strcpy(sqlca.sqlerrm, errmsg746); efree(Ifx_Result); php_error(E_WARNING,"Execute immediate fails : %s (%s)", statement, ifx_error(ifx)); RETURN_FALSE; Best wishes Andrey Glukhov -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php