Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends
I am developing a school project in which all the student Information is Typed in Datagridview and i also added student image in datagridview
Now i want to save the image from datagrid view to SqlDatabase


Thanks in Advance
Posted

This is how you get a value of the cell: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.value.aspx[^].

If you are not sure that the cell of if the proper type (System.Windows.Forms.DataGridViewImageCell or a custom type capable of storing an image in its Value, you can check up that the value has the type you expect:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.valuetype.aspx[^].

As to the storing and retrieving images in/from a database, honestly, it's not good to answer this question over and over. You can find it all from existing answers: http://www.codeproject.com/search.aspx?doctypeid=5&q=database+%28image+OR+images+OR+bitmap+OR+bitmaps%29[^].

Good luck,
—SA
 
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