This is a migrated thread and some comments may be shown as answers.

retrieve a picture

0 Answers 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zahra
Top achievements
Rank 1
Zahra asked on 14 May 2012, 08:17 AM
hi 
i have a picture in SQL data base
i want load it in a picturebox in a form of Windows App;
use this cod but have an error

byte[] imgBytes = reader["image column"];
MemoryStream imgStream = new MemoryStream(imgBytes);
pictureBox1.Image= Image.FromStream(imgStream);

error message is :
Cannot implicitly convert type 'object' to 'byte[]'. An explicit conversion exists (are you missing a cast?)
this program is writed with C# lan;
plz help me.
thanks

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Zahra
Top achievements
Rank 1
Share this question
or