Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

Can anyone help me, for saving a image into database and for retrieving that image from database. I need the query for doing this.
Posted
Updated 13-Feb-12 17:28pm
v3

Hi,

You may see my article if could help...
Display/Store and Retrieve Image Data from Database to Gridview

Happy coding...
 
Share this answer
 
try this,

have a column with a datatype varbinary in the database,convert the image to bytes and store it in the database.
while retriving get the thing in a byte array and write it to a file with image extension then you can use the image.
 
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