O'Reilly logo

.NET Framework 4.5 Expert Programming Cookbook by A.P. Rajshekhar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Retrieving large files (BLOB) from SQL Server using ADO.NET

In the last recipe, we saw how to save files of large size, or BLOB, into tables using ADO.NET. In this recipe we will focus on how to retrieve the saved files. Similar to the last recipe, we will work with high quality image files. We will be retrieving the data from the table and displaying it in a picture box. At the database side, we will use a stored procedure to retrieve the file data corresponding to the name. At the application level, we will make use of the DataSet class of ADO.NET to pass the filename to the stored procedure and get the data.

How to do it...

  1. Launch SQL Server Management Studio 2012.
  2. Open the database named CookBook.
  3. Next, add a stored procedure that will retrieve ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required