Edit report at http://bugs.php.net/bug.php?id=50811&edit=1

 ID:               50811
 Updated by:       ka...@php.net
 Reported by:      paul at dezinnia dot com
 Summary:          mssql_bind fails to bind parameters greater than 256
                   characters long
-Status:           Open
+Status:           Feedback
 Type:             Bug
 Package:          MSSQL related
 Operating System: Windows Vista
 PHP Version:      5.2.12

 New Comment:

Does mssql_bind() issue any warning or return false?


Previous Comments:
------------------------------------------------------------------------
[2010-01-20 23:05:38] paul at dezinnia dot com

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 this bug report at http://bugs.php.net/bug.php?id=50811&edit=1

Reply via email to