473,396 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Storing/Serving Photos For Windows Forms App

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.
Jun 28 '06 #1
2 2256
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
"Frankie" <A@B.COM> schreef in bericht
news:Ob**************@TK2MSFTNGP04.phx.gbl...
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.

Jun 28 '06 #2
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
Frankie wrote:
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.


Jun 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jeremy Simpson | last post by:
Can someone please help me with this? I am trying to put my jpg photos in my database. Access books seem to avoid the issue of graphics in DB tables and my searches on the internet seem to point me...
3
by: PB | last post by:
As part of an ASP.NET WEb Application I have a routine (relevant portion is below) that lets users rotate a photo (jpg or gif). The routine works just fine if it is run once. If run a second time...
5
by: netcoder77 | last post by:
Has anyone tried this in VB .NET or via VBScript? Can it be done? How do we handle retrieving a binary data format (the photo) using ADSI or VB .NET? All my searching on the net yielded no useful...
3
by: Roberto Hernández | last post by:
I try to use the Windows Image Acquisition (WIA) with a sample in vb.net but it takes only back photos and also at low resolution. How can I put ther resolution at 640x480? I have a Labtec webcam...
22
by: tcomer | last post by:
I'm working on a chat client and this is what I'm trying to do when a message is received: private void ReceivedMessage_Event(object sender, ClientEventArgs e) { // the ChatWindow class is...
4
by: lorirobn | last post by:
Hi, I need to add photos to my database. Back End is on MS SQL Server (I believe 2000), and Front End is on MS Access. I have read about storing the photos as BLOBS, but I am not sure how to...
1
by: cumupkid | last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time. I have created two forms, one...
6
by: gubbachchi | last post by:
Hi, Which is the best data type to store photos in mysql. BLOB is same as varchar type and increases the search time. Apart from BLOB, is there any other data type to store photos.
35
by: Stef Mientki | last post by:
hello, I (again) wonder what's the perfect way to store, OS-independent, filepaths ? I can think of something like: - use a relative path if drive is identical to the application (I'm still a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.