From:             paul at dezinnia dot com
Operating system: Windows Vista
PHP version:      5.2.12
PHP Bug Type:     MSSQL related
Bug description:  mssql_bind fails to bind parameters greater than 256 
characters long

Description:
------------
using the mssql database extension, i am attempting to bind a parameter 
of type nvarchar(1999) to a stored procedure.  Everything works as 
expected except when the length of the parameter exceeds 256 chracters.  

In the case of a parameter length in excess of 256 characters the 
following message is returned by the DB server.  "Procedure or function 
'FunctionName' expects parameter '@ParameterName', which was not 
supplied."



Reproduce code:
---------------
---
>From manual page: function.mssql-bind
---

this code won't reproduce the bug since you don't have access to my
database...but i'm including it here so you you can be sure i'm not just
getting a syntax error...

$sp = mssql_init("dbo.AddSnippet", $db);

$b = mssql_bind($sp, "@SnippetName", $snippetName, SQLVARCHAR, false,
false, 120);
$b = mssql_bind($sp, "@SnippetDescription", $snippetDescription,
SQLVARCHAR, false, false, 480);
$b = mssql_bind($sp, "@SnippetContent", $snippetContent, SQLVARCHAR,
false, false, 1999);
$b = mssql_bind($sp, "@tagstring", $tagstring, SQLVARCHAR, false, false,
1999);
$b = mssql_bind($sp, "@TagUserID", $tagUserID, SQLINT4);

mssql_execute($sp);

Expected result:
----------------
The stored procedure should add a record to the database and is designed 
to store nvarchar values of lengths up to 1999 characters.

Actual result:
--------------
When the parameter length exceeds 256 characters, an error occurs.  

When the parameter length is <=256 characters, no error occurs.

-- 
Edit bug report at http://bugs.php.net/?id=50811&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50811&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50811&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50811&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50811&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50811&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50811&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50811&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50811&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50811&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50811&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50811&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50811&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50811&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50811&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50811&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50811&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50811&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50811&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50811&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50811&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50811&r=mysqlcfg

Reply via email to