Click here to Skip to main content
16,022,737 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to retrieve images from database and save into a folder (with in project or in computer) i have more than 10000 images in database in the form of bytes.
Posted
Comments
F-ES Sitecore 19-Jun-15 5:03am    
google "asp.net read image from sql server" - lots of examples

1 solution

Just SELECT them, and cast the returned value into an array of bytes.
You can then just use File.WriteAllBytes[^] method to create a file with the appropriate extension.

For that number of images, I'd probably use a DataReader rather than a DataAdapter for save memory, and do the task in a BackgroundWorker as it's going to be a time consuming process.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900