Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2006

Tip: Looking for answers? Try searching our database.

Storing/Serving Photos For Windows Forms App

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frankie - 28 Jun 2006 01:02 GMT
Using SQL Server 2005 and .NET 2.0; I'm creating a Windows Forms application
that will need to display photos of people, along with a bunch of
information about each person.

In a Web application, there is a generally accepted "best practice" of
storing only a string (the path to the .jpg file name), with the actual file
stored in an NTFS folder (and not in the database).

What's the standard practice for Windows Forms applications? Is it the same
as for Web Forms apps?

My Windows Forms app will be a basic 2-tier client/server application - with
the need to serve up the photos+data from the central server, plus enable
users to upload photos.

Thanks.
Cor Ligthert [MVP] - 28 Jun 2006 05:25 GMT
Frankie,

Why should there be any difference this practise is based on the speed that
you can retrieve blobs from a database. Maybe will this best practise change
in future.

In WindowForms the images are probably even larger because of the fact that
the used datalines are mostly faster. The DataBaseServer speed stays however
the same.

Although a little thumbnail to identify the picture in the database can help
a lot finding them and therefore  speed up the handling.

Cor

> Using SQL Server 2005 and .NET 2.0; I'm creating a Windows Forms
> application that will need to display photos of people, along with a bunch
[quoted text clipped - 12 lines]
>
> Thanks.
Rimmer - 30 Jun 2006 02:23 GMT
Hi Frankie,

I cannot comment on what is the best practice, but as part of my
business I have a up and running application that does exactly what you
want.

I do not store the images in the DB, but instead store them on the file
system as you mentioned. The db stores the file location and some hash
(e.g size of image) information.

The client is given a list of the images from the db including the hash
information. The client can then download when required each image (as
part of a background thread if connection is slow) to the client and
cache there. It only needs to download the image if the hash
information changes (i.e. it has been updated on the server). This
solution allows for you to seperate the DB from image retrieval (they
could be on seperate machines if required). I used a webservice to
provide the images in question. I used this method as my client server
app can work disconnected, so may not have access to the db all the
time.

Note that the images can also be uploaded by the client using the same
principle.

Hope this helps you decide.
Anthoney
www.nowpromote.com.au

> Using SQL Server 2005 and .NET 2.0; I'm creating a Windows Forms application
> that will need to display photos of people, along with a bunch of
[quoted text clipped - 12 lines]
>
> Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.