Solved

Storing images in dataset

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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

840 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