473,385 Members | 1,925 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,385 software developers and data experts.

storing photos on db - SQL Server B/E, MS Access F/E

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 do this with SQL Server. Does this mean store the photo as OLE
image, but do something else to it to make it a "Blob"?

I have also read about linking to the photo rather than storing it on
the db, but I'd be afraid to do that as things get moved around in my
organization.

What we'd like to do is have a window where user specifies the path
the photo is located in (user presses "browse" button), then database
imports photo in and stores it.

Appreciate any help on this... THANKS!

(posting on 2 google groups)

Jun 18 '07 #1
4 3900

"lorirobn" <lo******@yahoo.comwrote in message
news:11**********************@n60g2000hse.googlegr oups.com...
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 do this with SQL Server. Does this mean store the photo as OLE
image, but do something else to it to make it a "Blob"?

I have also read about linking to the photo rather than storing it on
the db, but I'd be afraid to do that as things get moved around in my
organization.

What we'd like to do is have a window where user specifies the path
the photo is located in (user presses "browse" button), then database
imports photo in and stores it.

Appreciate any help on this... THANKS!

(posting on 2 google groups)
Link to the photo.
Place them in a secure location on your server so users cannot move them
around. To the user it would look like they are part of the DB.

Jun 18 '07 #2
you need A c c e s s D a t a P r o j e c t s
"lorirobn" <lo******@yahoo.comwrote in message
news:11**********************@n60g2000hse.googlegr oups.com...
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 do this with SQL Server. Does this mean store the photo as OLE
image, but do something else to it to make it a "Blob"?

I have also read about linking to the photo rather than storing it on
the db, but I'd be afraid to do that as things get moved around in my
organization.

What we'd like to do is have a window where user specifies the path
the photo is located in (user presses "browse" button), then database
imports photo in and stores it.

Appreciate any help on this... THANKS!

(posting on 2 google groups)

Jun 18 '07 #3
you can store them as an image datatype.

i'm also of the understanding that if you're talking about small items you
might be able to store them as varbinary and have much much much better
performance

wish i knew where to find out more about that varbinary thing; I think that
i saw it on a MS blog


"lorirobn" <lo******@yahoo.comwrote in message
news:11**********************@n60g2000hse.googlegr oups.com...
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 do this with SQL Server. Does this mean store the photo as OLE
image, but do something else to it to make it a "Blob"?

I have also read about linking to the photo rather than storing it on
the db, but I'd be afraid to do that as things get moved around in my
organization.

What we'd like to do is have a window where user specifies the path
the photo is located in (user presses "browse" button), then database
imports photo in and stores it.

Appreciate any help on this... THANKS!

(posting on 2 google groups)
Jun 24 '07 #4
The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects. It does not
cover every option for handling images (e.g., hyperlink fields, or using
Application.FollowHyperlink to display), but it does have an example of a
BLOB. I have used this techique occasionally since the days of Access 2.0
with server DB backend datastores.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Additional comments interspersed.

"lorirobn" <lo******@yahoo.comwrote
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 do this with SQL Server. Does this mean store the photo as OLE
image, but do something else to it to make it a "Blob"?
No, you just use AppendChunk to fill the OLE Object with binary data (hence
_B_inary _L_arge _OB_ject) and GetChunk to retrieve it. The OLE Object
Field is limited only by the size of the database.
I have also read about linking to the photo rather than storing it on
the db, but I'd be afraid to do that as things get moved around in my
organization.
Surely there is some way to control this, or at least provide "notice" if
the information is moved or the folders renamed? If the latter, your users
could browse for the new location. That's also illustrated in the example,
using the code from the FAQ at http://www.mvps.org/access/api/api0001.htm.
What we'd like to do is have a window where user specifies the path
the photo is located in (user presses "browse" button), then database
imports photo in and stores it.
The code referenced in the preceding paragraph uses the Windows Common
Dialog for this purpose. I'm sure there are other ways, but that has stood
me in good stead for a number of years, and it's in applications I use just
about every day.

Larry Linson
Microsoft Access MVP

Jun 24 '07 #5

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

Similar topics

4
by: Minh Tran | last post by:
In order to minimize the number of connection strings I have to use to access different databases on the same Sql Server, I was considering storing all stored procedures in just one database. I...
5
by: Don Vaillancourt | last post by:
I'm building a system when one can upload a document to the website. I will be storing the document on the hard-drive for quick/easy access, but I was also thinking of storing it in an existing...
2
by: Ross | last post by:
Hi I have an application using asp.net that I am running on my PC. The web form has a text box where you can enter a name for a new Photo category then click on the button. The code is...
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...
4
by: Dave G | last post by:
Firstly, apologies as this is not strictly an Access problem. I have a Access 2003 database containing records about people, and each person has 2 photos associated with the record. The photos...
2
by: Frankie | last post by:
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...
6
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to...
1
samycbe
by: samycbe | last post by:
hi, i am using sql server as a backend. i want to store employee photos. How to do? shall i store picure? Otherwise storing the picture in server and path(file name) can be stored? Pls help me.......
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.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.