Click here to Skip to main content
15,886,688 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to show the images from database..
Posted
Comments
Kornfeld Eliyahu Peter 25-May-15 4:52am    
How you stored the image to database?
sekar305 25-May-15 5:00am    
yes i converted image into binary and stored in database

Image in database is simply binary data. In your SQL data types there is a special data type[^], image (or binary). This is used to store such type of data, for this sake you would convert the file to binary (FileStream[^] would help you out in this one). Then to retrieve the same file again you would use the streams and convert the binary data back to file, by providing a meta tag ("image/jpg").

For more on this read, http://www.mikesdotnetting.com/article/148/save-and-retrieve-files-from-a-sql-server-ce-database-with-webmatrix[^]
 
Share this answer
 
 
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