C#- I'm trying to retrieve image from the MySQL Database -


its saved in blob format. 3 tier architecture followed, data retrieved database in datatable. others working fine except byte[]. appreciated. c# gives parameter not valid exception

foreach (datarow row in datta.rows) {     byte[] bytearray = row.field<byte[]>(10);     system.drawing.image returnimage;     using (var ms = new memorystream(bytearray, 0, bytearray.length))     {         returnimage = system.drawing.image.fromstream(ms);     } } 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Python Tornado package error when running server -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -