Bug #18057 Updated: I can't receive value from Stroed Procedure
| From: | kalowsky@php.net | Date: | Tue, 23 Jul 2002 15:37:22 +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-14899@lists.php.net to get a copy of this message | ||
ID: 18057
Updated by: kalowsky@php.net
Reported By: smg@hktl.com
-Status: Open
+Status: Closed
Bug Type: ODBC related
Operating System: Windows 98/ME/200,Linux
PHP Version: 4.2.1
New Comment:
ODBCv2 does not work with procedures, sorry. Please read the MS ODBC
specification for more information regarding this at
http://www.microsoft.com/data/odbc
Previous Comments:
------------------------------------------------------------------------
[2002-07-15 08:11:39] erik@ableson.homeip.net
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);
?>
------------------------------------------------------------------------
[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