Bug #18057 Updated: I can't receive value from Stroed Procedure

From: Date: Mon, 15 Jul 2002 12:11:40 +0000
Subject: Bug #18057 Updated: I can't receive value from Stroed Procedure
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14195@lists.php.net to get a copy of this message
ID: 18057 Updated by: erik@ableson.homeip.net Reported By: smg@hktl.com Status: Open Bug Type: ODBC related Operating System: Windows 98/ME/200,Linux PHP Version: 4.2.1 New Comment: I have something similar which I've distilled to a simpler problem with the DB2/ODBC drivers although my DB2 instance is running on an AS400 as well, so it may be part of the problem. Basically, I cannot retrieve any data from DB2. It properly connects, issues the query but consistently returns 0 rows. Forcing a bad password correctly returns an authentication error and creating an invalid SQL query correctly returns an error as well. From the amount of time required to return the page, it appears to be issuing the query and waiting on the response. Complex ugly queries take a long time to process but always result in zero rows returned. Code sample used to force at least a one row return which returns 1 field, 0 rows: <?php $dbconn = odbc_connect ( "DSN", "USER", "PASSWORD"); echo "Connected to: $dbconn<br>"; $sqlresult = odbc_exec( $dbconn, "SELECT COUNT(*) AS TOTAL FROM RU99.RC545 WHERE SIGNONID='L6XJ'"); echo $sqlresult . "<BR>"; echo "Fields: " . odbc_num_fields ($sqlresult); echo " Rows: " . odbc_num_rows ($sqlresult); odbc_close($dbconn); ?> Previous Comments: ------------------------------------------------------------------------ [2002-06-28 21:59:40] smg@hktl.com Hi. first, my english is not good but I believe you are understand about my english. I can't receive return value from DB2/400 Stroed Procedure. next source <? $db_conn=odbc_connect("DSNBSN400","WEBUSER","WEBUSER") or die ( odbc_error () ); $result=odbc_prepare($db_conn,"Call WEBLIB.TEST_SP01(?,?)"); $par[0]=11;$par[1]=''; if(!odbc_execute($result,&$par)) { print("The odbc statement failed to execute! "); } print_r($par); ?> I want to receive Return Value. good job bye ps : I using to IBM AS/400 DB2 UDB ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18057&edit=1

« previous php.bugs (#14195) next »