SQL Server allows you to save data in binary format. By making use of this feature, we can save files of large size (more than 2 GB). Data having a large size are known as Binary Large Objects or BLOB. This recipe will detail the steps to use this feature in a .NET application. The saving of files at database level will be handled through a stored procedure. The application will pass the required data to the stored procedure and execute it.
We will be using image files for this recipe. Neither the application nor the stored procedure will check for uniqueness of the name of the file being saved. Checking for the uniqueness of the uploaded file is beyond the scope of this recipe.