Re: [PHP4BETA] How to handle Oracle Error Messsages?
| From: | Manuel Lemos | Date: | Fri, 03 Mar 2000 16:05:07 +0000 |
| Subject: | Re: [PHP4BETA] How to handle Oracle Error Messsages? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11474@lists.php.net to get a copy of this message | ||
Hello David,
On 03-Mar-00 13:18:35, you wrote:
>At one point you said that I needed to be sure that ORACLE_HOME was set
>to be able to get the text of the error messages. How do I get the text
>other than via $php_errormsg? I did see a comment in the php manual with
>the user contributed messages that stated that OCIError() really returns
>an array with a number as the first element and string as the second,
>but that is not working for me (I am running the php4, Beta 3). I get a
>parse error when I try that.
You need to do something like this:
$error=OCIError($handle);
$code=$error["code"];
$message=$error["message"];
$handle may be a connection handle, a statement handle or nothing at all,
it depends on the circumstance you are calling it.
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--