Retrieving Text Data from SQL Server 2000 Using PHP

August 13, 2007 – 3:43 pm

The default values limit all text retrieved from text and image fields to 4096 characters (bytes). The workaround for this is as follows.

ini_set("mssql.textsize", 536870912);
ini_set("mssql.textlimit", 536870912);
mssql_connect(...);
mssql_select_db(...);
mssql_query("SET TEXTSIZE 536870912");

Please note that you must call the ini_sets before you connect to the database.



Was this helpful? Check out these related posts:

  1. Connecting to Microsoft SQL Server with PHP
  2. Install SSH Server on Ubuntu
  3. SQL Server Query Analyzer Results to Excel (TSV)

Post a Comment