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

The SDK directory does not exist (ubuntu 16.04) (react native) -

python - How to clone or copy a list? -

string - Using python and postgres, variables within execute function? -