php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34410 Empty string converted to null using bind function
Submitted: 2005-09-07 18:13 UTC Modified: 2005-09-07 23:43 UTC
From: daigo75 at wooow dot it Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 5.0.5 OS: Windows 2000 Professional/Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: daigo75 at wooow dot it
New email:
PHP Version: OS:

 

 [2005-09-07 18:13 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-07 23:43 UTC] sniper@php.net
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


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC