Solved

Storing images in dataset

Posted on 2009-05-05
4
170 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

20 Experts available now in Live!

Get 1:1 Help Now