If these pictures do not need special protection, it is better to save them in the file system, ond only keep a record of the filename and path in the database.
Otherwise you have to read the binary data from the databese and serialize it to the output.
This can be done via the graphic labrary of php.
After you are talking of MS-SQL, you propably have a IIS running.
If you dont have PHP, you have to find a similar functon in ASP.NET
As you can see - the easyest methode is the link relation in the database, while the image is stored in the file system.