On the SQL Server side, by all means, use the VARBINARY(MAX) - this is a binary file, up to 2 GB in size, fast, it is ideal for this use case. Up to an average image size of about 1 MB, this is probably the best choice - even better than using the SQL FILESTREAM SQL Server 2008 attribute (which is great if you have many really large images larger than 1 MB per regular, here the binary file itself is stored in the file a server system of a machine running a database).
In your .NET code, you probably want to use Image or derived classes β you end up having to pass these bytes to SQL Server anyway, but you donβt need to use an array of bytes from the beginning β all the mapping types in .NET offer some streaming support.
marc_s
source share