Link to home
Create AccountLog in
Avatar of KaranGupta
KaranGupta

asked on

Storing images in dataset

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.
Avatar of RyanAndres
RyanAndres
Flag of United States of America image

Read the image using a filestream and store it as a byte array.
ASKER CERTIFIED SOLUTION
Avatar of kaylanreilor
kaylanreilor
Flag of Luxembourg image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of KaranGupta
KaranGupta

ASKER

Hi

Don't you think this will create an overhead to convert the file into stream and then back to the original one
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.