Skip to main content

Posts

Showing posts with the label read

Read from MS SQL BLOB column

In SQL SERVER 2005 the most common data type for storing BLOBs was an IMAGE  datatype. When SQL Server 2008 and later SQL SERVER  2008 R2 occured the image datatypes coexists with several new and recomended by Mictosoft BLOB datatypes such varbinary(MAX). Let`s have a look: varbinary(max) /binary(n)  variables store variable-length binary data of approximately n bytes, may store a maximum of 2 gigabytes. image variables store up to 2 gigabytes of data and are commonly used to store any type of data file (not just images). But when you`re designing a new database structure be patient and choose the newest one type according to the Microsoft note: "ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead. Fixed and variable-length data types for storing large non-Unico