#22294 [Opn->Bgs]: Output parameter is not populated
| From: | fmk@php.net | Date: | Tue, 20 May 2003 23:19:13 +0000 |
| Subject: | #22294 [Opn->Bgs]: Output parameter is not populated | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40098@lists.php.net to get a copy of this message | ||
ID: 22294
Updated by: fmk@php.net
Reported By: rajesh dot gala at cgi dot com
-Status: Open
+Status: Bogus
Bug Type: MSSQL related
Operating System: win32
PHP Version: 4.3.2-dev
New Comment:
I have just testet this sample with the current CVS version.
This is my exact test code
<?php
if (!extension_loaded("mssql")) {
dl("php_mssql.dll");
}
$conn = mssql_connect("asterix","web","webuser");
$stmt = mssql_init("AuthLoginUser", $conn);
$LoginUser = "frank";
$Password = "frank123";
mssql_bind($stmt,"@LoginUser",$LoginUser,SQLVARCHAR);
mssql_bind($stmt,"@Password",$Password,SQLVARCHAR);
mssql_bind($stmt,"@ReturnVal",&$ReturnVal,SQLINT4,True);
$result=mssql_execute($stmt);
echo '<br><b>Return Value '.$ReturnVal.'</b>';
mssql_close($conn);
?>
And this is my output
Return Value 1
There is no problems with return values as far as I can telle.
mssql_bind($stmt,"@ReturnVal",&$ReturnVal,SQLINT4,True);
and
mssql_bind($stmt,"@ReturnVal",$ReturnVal,SQLINT4,True);
both works as the third parameter is forced to be BYREF.
Previous Comments:
------------------------------------------------------------------------
[2003-04-22 06:45:22] rajesh dot gala at cgi dot com
mssql_bind($stmt,"@ReturnVal",&$ReturnVal,SQLINT4,True);
does not work.
------------------------------------------------------------------------
[2003-04-10 04:43:50] arnarb at oddi dot is
The documentation states that output variables have to be passed by
reference into mssql_bind. Like this
mssql_bind($stmt,"@ReturnVal",&$ReturnVal,SQLINT4,True);
Also, the documentation also notes that if a stored procedure returns
multiple result sets, the output parameters will _not_ be available
until mssql_next_result has been called for the last result-set.
Does this have any effect on your test cases?
--Arnar
------------------------------------------------------------------------
[2003-03-06 23:20:49] sniper@php.net
forget my last comment, I didn't notice that you already
had tried the snapshot..
------------------------------------------------------------------------
[2003-03-06 23:19:45] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
There have been some fixes for mssql stuff in it..
------------------------------------------------------------------------
[2003-03-06 23:12:25] rajesh dot gala at cgi dot com
The version of PHP is use is 4.3.1 windows binary downloaded from the
php.net site. The zip file date is 18-Feb-2003.
SQL Server 2000
OS Win 2000
Webserver Apache 4.0.44
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/22294
--
Edit this bug report at http://bugs.php.net/?id=22294&edit=1