SET TEXTSIZE

Specifies the size of varchar(max)*, **nvarchar(max), varbinary(max), text, ntext, or image data returned by a SELECT statement.

Syntax

SET TEXTSIZE { number }  [;]

Arguments

number

Is the length of varchar(max)*, **nvarchar(max), varbinary(max), text, ntext, or image data, in bytes. number is an integer with a maximum value of 2147483647 (2 GB). A value of -1 indicates unlimited size. A value of 0 resets the size to the default value of 4 KB.

The SQL Server Native Client (10.0 and higher) and ODBC Driver for SQL Server automatically specify -1 (unlimited) when connecting.

Drivers older than SQL Server 2008: The SQL Server Native Client ODBC driver and SQL Server Native Client OLE DB Provider (version 9) for SQL Server automatically set TEXTSIZE to 2147483647 when connecting.

Remarks

Argument values are ignored and do not change the default behavior.

Permissions

Requires membership in the public role.

See Also