September 20, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Working with Binary Large Objects (BLOBs) Using SQL Server and ADO.NET

  • July 28, 2008
  • By Bipin Joshi
  • Send Email »
  • More Articles »

Summary

Applications that deal with Binary Large Objects, or BLOBs, need to evaluate whether to store data inside SQL Server or as a physical file. SQL Server provides the varbinary(MAX) data type to store BLOBs although the older Image data type is still available. The BLOB data can be read in .NET applications by using the SqlDataReader class. The GetBytes() method of SqlDataReader allows you to read chunks of binary data from a column. When writing the binary data back to the database, the SQL server .WRITE clause can be used to write data in chunks. SQL server and ADO.NET together make it easy for you to deal with large binary data such as documents, files, and photos.

Download the Code

You can download the code that accompanies this article here.

About the Author

Bipin Joshi is the proprietor of BinaryIntellect Consulting where he conducts premier training programs on a variety of .NET technologies. He wears many hats, including a software consultant, mentor, prolific author, webmaster, Microsoft MVP, and a member of ASPInsiders. Having adopted the Yoga way of life, Bipin also teaches Kriya Yoga to interested individuals. He can be reached via his blog at www.bipinjoshi.com.





Page 7 of 7



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel