I want write a binary format file onto a feild in SQL server. I'm unable to accomplish this. Any help / Ideas????

However, I am able to write the file to remote Fileshare on the Network. I mapped the Share as NetworkDrive. Now I am writing the file as usual using

FileStream streamWriter = File.Create(filepath);
streamWriter.Write(data, 0, size);

and it writes fine and retrieves fine. But I want this in the Database instead of as a file in the network share.