Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Binary and Large-Value Data (ADO.NET)

Microsoft SQL Server 2005 introduced the max specifier, which expands the storage capacity of the varchar, nvarchar, and varbinary data types. varchar(max), nvarchar(max), and varbinary(max) are collectively called large-value data types. You can use the large-value data types to store up to 2^31-1 bytes of data. The text, ntext, and image data types in earlier versions of SQL Server can be replaced with varchar(max) and nvarchar(max), respectively, and the image data type can be replaced with varbinary(max).

When using the max modifier, the maximum in-row storage for large value data types is set to 8,000 bytes. When a large value type or a large object data type column value is stored in the data row, the Database Engine does not have to access a separate page or set of pages to read or write the character or binary string.

SQL Server 2008 introduces the FILESTREAM attribute, which is not a data type, but rather an attribute that can be defined on a column, allowing large-value data to be stored on the file system instead of in the database. FILESTREAM data benefits from the fast streaming capabilities and storage capabilities of the NTFS file system while being managed and accessed directly in the context of the database.

Modifying Large-Value (max) Data (ADO.NET)

Describes how to work with the large-value (max) data types introduced in SQL Server 2005.

FILESTREAM Data in SQL Server 2008 (ADO.NET)

Describes how to work with large-value data stored in SQL Server 2008 with the FILESTREAM attribute.

Streaming BLOBs (ADO.NET)

Demonstrates how to stream BLOB values to versions of SQL Server earlier than SQL Server 2005.

Large BLOBs and UPDATETEXT (ADO.NET)

Demonstrates how to write a BLOB in chunks to SQL Server 2000.

Community Additions

ADD
Show:
© 2015 Microsoft