Vaibhav Gaikwad
Microsoft .NET developer
Bla Code! Bla Code!

May 2017 Entries

MS SQL - bcp to export varbinary to image file

I don't do much SQL in regular day to day basis but when it comes to it then it gets really exciting. Here is one of the odd days where I wanted to push out a image file from SQL which was sorted as varbinary(MAX) in database. As you all know that bcp is a very handy utility when it comes to dumping data out. So, I made that as a first choice but soon realized it was difficult to handle varbinary with the default arguments. Reading the internet here is what I could learn...You need a format (.fmt) ......