rsimlote,
Files or any binary data is stored in SQl Server as a byte array.
Placing a file into SQL, means placing the file into a stream (of bytes), and then save that
to the column.
Likewise when extracting this binary data to be used by another application, it is a matter of reading the bytes from the column and writing them to disk, and finally executing the file.
This means that you will need to store more than just the bytes of the file. You will also want to save some file information such as the FileName, or as a minimum, the file extension. In a recent project, I also saved the DateTime as well so that I could reset the file to the correct name and date criteria. I also included a checksum that I could test to make sure that what I wrote to disk is exactly what I originally copied from disk to SQL.
If you want an example of saving to SQL, retrieving from SQL then executing it (something like an Excel or Word file), let me know and I can whip one up this evening after work.
Regards,
Jerry