Click here to Skip to main content
14,735,911 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 18:28pm
v3

Hi,

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

Happy coding...
   
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.
   

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