Solved

Storing images in dataset

Posted on 2009-05-05
4
171 Views
Last Modified: 2013-11-08
Hi

My project requirement is I want to add images in a temporary variable and bind it to the grid and then after that I want to store the image in a folder.

Can you suggest me some option to where I can store the images temporarily.
0
Comment
Question by:KaranGupta
  • 2
4 Comments
 
LVL 8

Expert Comment

by:RyanAndres
ID: 24311401
Read the image using a filestream and store it as a byte array.
0
 
LVL 13

Accepted Solution

by:
kaylanreilor earned 500 total points
ID: 24311413
Mainly there is System.Drawing.Image class coupled with the System.IO.MemoryStream class and/or some arry of bytes.
First, let's have a look to an example : http://bytes.com/groups/net-c/240875-loading-images-dataset
0
 

Author Comment

by:KaranGupta
ID: 24311414
Hi

Don't you think this will create an overhead to convert the file into stream and then back to the original one
0
 
LVL 13

Expert Comment

by:kaylanreilor
ID: 24311520
What you name "the file" is stored into the DB as a binary stream, or let say an array of byte. When binding from a DB from a program you always work with a copy, aren't you ? So now you can have several reference on the same data, I don't see a lot of overhead here.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now