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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -