Set TEXTSIZE usually does it for me: <? mssql_connect ($conn, $user, $pwd); mssql_select_db ($db); mssql_query ('Set TEXTSIZE 2147483647');
mssql_query ('Select text_column from table where Id = 1'); ?> Make sure that you select a database first and that the connection is not closed between your Set TEXTSIZE op and the actual query. If you are not specifying a connection in you mssql_query statement, make sure that you haven't opened a different connection between Set TEXTSIZE and your actual query--PHP uses the most recently opened connection as a default, and if you open a new connection between the two queries, the second connection will not have the TEXTSIZE set. Hope that helps. Marco On Thu, 2002-10-10 at 17:04, Vail, Warren wrote: > Encountered the following problem with the Microsoft SQL Server interface. > I am not sure where the problem exists, but I am looking for a workaround. > > I inserted a row into a table that contained a text column, and inserted > over 5kb string into the text field. On retrieving the row the server > returned the column values truncated to 4096 bytes exactly. Tried to code > SET TEXTSIZE nnn into my query string, the query refused to return anything > at all. Then I tried coding SET TEXTSIZE as a separate query on the same > connection, just prior to my data query, both appeared to be successful, but > still only got 4096 bytes of data. > > select DATALENGTH(availabilitySample) from mftsmainframeavailability where > availabilityID = 1 > > using the MSSQL 7 Query analyzer returns; > > ----------- > 5242 > > (1 row(s) affected) > > This shows that my text was stored, I just can't seem to get the server (or > the interface) to give me back more than 4096 bytes. > > any clues would be greatly appreciated. > thanks in advance, > > Warren Vail > Tools, Metrics & Quality Processes > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php