sql server 2008 - mssql_bind in PHP truncates string -


i'm using freetds connect , work sql server 2008 database php 5.3.15 on linux. have column in database has datatype of varchar(max).

unfortunately, i'm having trouble setting value of column via mssql_bind() when value is on 8000 characters. value gets stored in database, truncated @ 8000 characters. stored procedure i'm calling has set input variable proper datatype (varchar(max)).

here i've tried:

  • in php.ini have set both mssql.textlimit , mssql.textsize maximum allowed values (2147483647). seems no matter set these have no affect on size of text can send through. is, setting these value of, say, 100, not truncate text @ 100 characters.
  • setting mssql.textlimit , mssql.textsize using ini_set(). again, seems have no affect.
  • setting maxlen attribute of mssql_bind() number higher 8000. above, setting lower number seems have no affect.
  • changing datatype of column text and/or changing type attribute of mssql_bind() sqltext.

additionally, make matters more confusing (to me @ least), can entire string length stored in database through following means:

  • in stored procedure hard coding length of value of variable declared varchar(max) more 8000 characters. stores entire string.
  • not using stored procedure, instead executing query directly in php as: "update my_table set my_large_colmn = '{$text_longer_than_8000_chars}'". stores entire string.

so how believe i've narrowed down mssql_bind() method truncating length 8000 characters.

is limitation of mssql_bind() , freetds driver in php or missing something?


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -