Re: [PHP4BETA] How to handle Oracle Error Messsages?
| From: | David Munsey-Kano | Date: | Fri, 03 Mar 2000 20:18:31 +0000 |
| Subject: | Re: [PHP4BETA] How to handle Oracle Error Messsages? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11482@lists.php.net to get a copy of this message | ||
Manuel,
You have been so helpful, thanks. I'll try those two suggestions. Now I
feel foolish, because when I go back and reread the user supplied notes
in the php.net version of the manual, it tells of the array returned
with the two keys you mentioned. Sorry for the poor research!
I started to check out your classes site, but did not yet download
anything to read and/or try the code. Thanks for creating free reusable
software for php!
Sincerely, David
Manuel Lemos wrote:
>
> 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
> --
--
David Munsey-Kano
Dartmouth College
(603) 646-1320
Murphy was a liar, not a lawyer!