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.
In This Section
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.
See Also
Other Resources
SQL Server Data Types and ADO.NET
SQL Server Data Operations in ADO.NET