Is there any way to store image in database? I am using MS SQL and I wanna store image file or other file type.
Can I store image file directly to database or store just string to describe the location of the image file?
Thank you for viewing my questions and I hope I will get good solutions soon. :-)

Brij SarojPosted Jun 2, 2016, 5:52 PM
It seems other people have been using this approach for saving images for a long time. See this post from 2010 about images in database:
Ranjit KanojiaPosted May 31, 2016, 6:20 AM
I have some experience storing documents in SQL Server 2008 usng FileStreaming. It takes a bit of configuring, and the code is a bit different than regular SQL, but it works well. Having both the ability to use streaming to read and write to the files and having the transaction support of SQL Server is great!
If you can use Sql Server 2008 R2, consider that. If you wish to use Snapshot Isolation AND FileStreaming on the same database, it's only supported in this version.
We are preparing to put this into production.
One disadvantage of this approach is that while the files are externally accessible, you still have to query SQL to get the information to access them, so you can't just have the file server serve the images directly.
There's another project I"m involved in, that will be solely images... The number of images, and sizing of the system are such, that putting them into SQL Server isn't really an option. On top of that, we are building this in the "cloud", using Windows Azure. SQL Azure doesn't have support for file streaming as of yet.
Good luck to you.
Akshay PhadkePosted May 31, 2016, 2:38 AM
Ravi PatelPosted May 31, 2016, 2:23 AM