0

I have converted image to byte array and vice verse, saved it in db and binary file thousands of time, but now i encountered by a really stupid exception: "Parameter is not valid." there is another thing that made the issue more funny. I CAN LOAD THE IMAGES IN ACTIVEREPORT BUT NOT IN A GRID!!!

the code I've used to load image from byte arrays that saved in an image datatype column in SqlServer 2005 db is:

byte[] bytesIn = (byte[]) row["fldPicture"];
System.IO.MemoryStream ms = new System.IO.MemoryStream(bytesIn , 0 , bytesIn.Length);
System.Drawing.Image img = System.Drawing.Image.FromStream(ms, true, true);

at the end i should point to the fact that i didn't save images into db and i do not know how and in which type they are saved.

please help me...

Edited by GreenDev.S: n/a

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by __avd
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.