ID:               11550
 Comment by:       mga at nrd dot lt
 Reported By:      g dot giunta at libero dot it
 Status:           Bogus
 Bug Type:         Oracle related
 Operating System: Windows 95; SCO Openserver 5.0.5
 PHP Version:      4.0.4pl1
 New Comment:

The same problem with PHP ver. 4.2.2
Deep analysis shows that ora_exec fails when at least one return
parameter was null or empty string.
Solution which works:
For example:
I had procedure: getLEInfo(:i_LECode, :o_LEName, :o_LEAddress,
:o_AddInfo)
Parameter o_AddInfo value in most case were empty string.
So when I execute query like this "begin getLEInfo(:i_LECode,
:o_LEName, :o_LEAddress, :o_AddInfo);end;"
I got ORA-01405.

But the query bellow works without problem:
"declare LEName varchar2(100); LEAddress varchar2(100); AddInfo
varchar2(100); begin getLEInfo(:i_LECode, LEName, :o_LEAddress,
:o_AddInfo); :o_LEName := nvl(LEName, ' '); :o_LEAddress:=
nvl(LEAddress, ' '); :o_AddInfo := nvl(AddInfo, ' '); end;"

Maybe it is too straight solution, but it works.

Marius

P.S. if return value is empty, this solution produces ' ' value, so
trim it or just keep in mind :)

Marius


Previous Comments:
------------------------------------------------------------------------

[2002-08-13 22:55:19] [EMAIL PROTECTED]

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.



------------------------------------------------------------------------

[2001-06-19 03:58:05] g dot giunta at libero dot it

Returning a NULL value as an OUT parameter of a stored procedure
(oracle 7.3.4 both client & server) I get the following error from a
call to ora_exec: 

ORA-01405: fetched column value is NULL -- 
while processing OCI function OEXEC/OEXN 

I've checked the parameter is correctly bound to a php global variable.


I tried defining the same parameter both as OUT and IN_OUT, to no
avail. 

I also tried calling the same exact procedure using oci_ functions
instead of ora_, and everything works! (Unfortunately my web server is
sitting on a sco box, so I'm doomed to use oracle 7.3.4 in
production...) 

Looking at the description of the error in oracle manuals, I think this
could be a pbl in the use of pro*C (well, whatever the php oracle
extension is written with), but I might be wrong

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=11550&edit=1

Reply via email to