|
-
May 1st, 2011, 01:32 AM
#1
need help in image retrieval
Hi
i am completely new to C Sharp and trying to learn it...
i am facing problem in retrieving images from my database and showing it in a picture box..
i did get the code on-line for converting the byte data to an image but have no idea how to pass an argument to it...
actually i know how data adapters and data sets can hold simple character data from the DataBase but have no idea about accessing the data stored in image column..
i did try data reader but couldn't read the bytes.
the code for byte to image conversion is this one:
public Image byteArrayToImage(byte[] byteArrayIn)
{
MemoryStream ms = new MemoryStream(byteArrayIn);
Image returnImage = Image.FromStream(ms);
return returnImage;
}
P.S: i dont know much about C# so plz keep it simple
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|