In my project I'm using a DataGridView with 32 columns of textbox and 1 column as Image column . My question is how to insert the DataGridView image column to the database (sql server 2008)?
I've written same codings below but it doesn't work. Showing error message.
My coding is :
memorystream stream = new memorystream();
string filename=datagridview1.Cells[33].Value;
bitmaps image=new bitmaps(filename);
image.Save(stream,system.Drawing.Imaging.Imageformat.Jpeg)
byte[] pic=new byte(image);