PictureBox question

  • Thread starter Thread starter Woody Splawn
  • Start date Start date
W

Woody Splawn

I just wondering if rather than keeping a database with pictures of
employees in it (like a photo field), I'm wondering if instead you could
just keep the picture files in your bin directory of a project, and call
them in real time as you move from record to record on a winform? Is this
possible? Is this preferable to having to duplicate the files, like .jpg
files, by placing them in a field in a SQL Table?

In the northwind application there is an employees table. It has a field in
it called Photo. But it also has a field called PhotoPath. This field
contains the path to the location where the .bmp file is that makes up the
picture. Would it be just as easy, would there be any benefit, is it
possible or preferable to do, to simply determine the path name of the .bmp
or .jpg file as you move from record to record and then by some magic, load
that picture into an UltraPictureBox control from the specified location?
Would there be a loss of spead? Is this considered orthodox?

Just wondering what the options are.
 
Hi Woody,

Both are options, I find the nicest to have a thumbnail in the database and
a reference to the actual file picture file.

Reading and writing a big blob file can take a lot of time.

When you are that far that you have made your decission and you want to use
that thumbnail, message than back, I do not have direct a sample, however
from two I can make one.

I hope this helps?

Cor
 
I would store a URN or relative path name as you suggest, using the database
to store the picure itself is probably not a good way to go unless security
is an issue, then this complicated matters. As you then need to correlate
the database entry with the resource.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
Back
Top