473,695 Members | 2,820 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3923

"lorirobn" <lo******@yahoo .comwrote in message
news:11******** **************@ n60g2000hse.goo glegroups.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.goo glegroups.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.goo glegroups.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.Fol lowHyperlink 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.zi p 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
2040
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 want to do this because connection pooling in my application - ASP.NET is based on this connection string. So if I need to access 6 different databases on one sql server & set 6 different connection strings, I end up creating 6 different...
5
2142
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 database since most of the sites information is all stored there. As well there would be only one place to worry about backing up. And if the file on the hard-drive was ever missing or became corrupted, I could restore it form tha database. Is...
2
2214
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 intended to create a new directory under Photos such as "Relatives".
5
24407
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 results except for a half completed Perl script which claimed to be able to upload and download photos stored in AD as part of the User account.
4
2268
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 are stored in a 'photos' folder. When a record is displayed, so are the photos. It all works fast and well. But I'm now getting close to 50,000 records and although it still works well I'm worried about having 100,000 jpgs in one folder.
2
2281
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 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...
6
3195
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 me like there were performance issues at the time. How about the different types? The MS docs I would expect Access to differentiate and handle appropriately (i.e. .DOC and .XLS).. but how about ..PDF? and can I stash a .TXT document in the...
1
1255
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.... samy
6
3520
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
8572
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8984
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8847
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8825
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5839
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4340
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2272
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.