#34410 [Opn->Bgs]: Empty string converted to null using bind function
| From: | sniper@php.net | Date: | Wed, 07 Sep 2005 21:43:25 +0000 |
| Subject: | #34410 [Opn->Bgs]: Empty string converted to null using bind function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84654@lists.php.net to get a copy of this message | ||
ID: 34410
Updated by: sniper@php.net
Reported By: daigo75 at wooow dot it
-Status: Open
+Status: Bogus
Bug Type: MSSQL related
Operating System: Windows 2000 Professional/Server
PHP Version: 5.0.5
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2005-09-07 18:13:31] daigo75 at wooow dot it
Description:
------------
Hello!
I call a stored procedure as follows:
$sp=mssql_init("spTest");
$VarTemp='';
mssql_bind($sp,"@Param1",$VarTemp,SQLVARCHAR,0,false,100);
$ResultSet = mssql_execute($sp);
When param "@Param1" is passed to stored procedure, it
gets null instead of an empty string. Note that "Is_Null" parameter is
set to false.
Reproduce code:
---------------
$sp=mssql_init("spTest");
$VarTemp='';
mssql_bind($sp,"@Param1",$VarTemp,SQLVARCHAR,0,false,100);
$ResultSet = mssql_execute($sp);
Expected result:
----------------
Stored procedure should receive an empty string as value of "@Param1"
parameter.
Actual result:
--------------
Stored procedure receives NULL as value of "@Param1" parameter.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34410&edit=1