473,396 Members | 1,689 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.

Access 2007 Batch Import ID pictures into 800+ records

2
Access 2007 on XP Pro
Each record contains two fields - StID (a unique ID number) and Pic (an attachment field to hold a jpg). Is it possible to create a batch import that places the picture in the appropiate Pic field for each of the records - and "skip" a record if it's picture can't be found.

ie StID=3076, Pic would import 3076.jpg.

All jpgs are in the same folder, CafePics.

Thanks
Sep 8 '07 #1
4 10492
missinglinq
3,532 Expert 2GB
This subject has been discussed here and on other forums frequently, so to begin with you'd do well using the Search Feature with the search terms storing and images. Here are a couple of external sources as well:

http://www.vb123.com/toolshed/99/externalimages.htm

http://www.granite.ab.ca/access/imagehandling.htm


The general wisdom has always been to store the path to the image rather than the image itself because images, especially jpegs, create tremenous database bloat in Access.


Good Luck and Welcome to TheScripts!


Linq ;0)>
Sep 8 '07 #2
EHOHP
2
I had tried that when we were using Access 2003 with limited success. I thought, with 2007, file size issues had been corrected with the attachment feature. I am experimenting with the information found on the web sites you've given.

Thanks
Sep 8 '07 #3
Hello. The attachment feature is an improvement in image handling. Access 2003 was incredibly braindead in imbedding images. If an image file in compressed format, such as JPEG, was imbedded the database size would increase by the size of a corresponding uncompressed bitmap (!!). More remarkable is that this behavior was the same if you asked it to link to the file. In contrast, MS-Word handles linked images the way you might expect (file size increases neglibly). The only tolerable way to put lots of images in a Access 2003 database was to use a hyperlink (ick) and/or a low-res thumbnail (ick).

Access 2007 attachments are a curious beast. It pretends to keep a reference to the original file, reporting a list of the file names. However, the file is actually imbedded in the database file. You'll see that if you move or delete the original image, that the attachment is still there. If you try to open it, via the attachment manager, Access will automagically create a copy of the file in a temporary internet files directory for the default viewer to open. The main improvement over Access-2003-style imbedding is that the space it takes up in the database is *only* the original size of the file (not an uncompressed bitmap). In my opinion they should have just fixed the broken functionality in 2003 (but then MS couldn't tout it as a new feature!). Anyway, it does make life slightly more managable if you want high-res images in a database. It also does quite well for attaching highly-compressible, line-art type images using PNG format.

Cheers!
Richard
Aug 30 '08 #4
youmike
69
Linq's advice about storing the link rather than the image cannot be emphasised too strongly. Since you have already chosen to name the .jpg files with an Id No as the file name, the process is really simple. Apart from the bloat that the .mdb file will suffer, my experiments suggest that you wil slow perfomance too if you choose to embed.

I've done this with pictures of plants for a nursery catalogue, using a custom built VBA module, which responds to a no match with a message box cautioning the user when there is no pic. If, like my application, yours usually needs only a single .jpg at any time, I think you really will see the better performance.
Aug 30 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steve Claflin | last post by:
I have a database with a moderate number of records in several tables (the biggest table at the moment is about 800 records). In development it got moved between 2K and XP repeatedly. Several...
10
by: Rattanak Song | last post by:
Hi, I'm trying to build a database which can capture a still image from a digital camera or web cam and import to the database via an Object or something like that. Any help would be very...
46
by: Adam Turner via AccessMonster.com | last post by:
If I had a field called "Name" in an Access table "Contact Info", and the field contained VBScript... Function Main(rstFields) Main = rstFields.Item("FirstName").Value End Function 1. How do...
14
by: mfrsousa | last post by:
hi there, i have a huge large text file (350.000 lines) that i want to import to a MS Acccess Database, of course i don't want to use Access, but do it with C#. i already have tried the...
4
by: lupo666 | last post by:
Hi everybody, this time I have three problems driving me nuts :-((( (1) I have a report with 20 or so Yes/No "squares". Is there a way to either hide/show the "square" or change the yes/no...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
2
by: hakkatil | last post by:
Hi to all, I have a page that inserts excel sheet to access database. I am using asp. What I want to do is to check the inserting record if it is in the database. Basicly checking the dublicate...
0
by: brendan | last post by:
I'm trying to write a code that batch renames photos. In the end each photo should be named: AABBB1111YYYYMM222 where AABBB1111 defines a given place. (i.e. CAMTL = montreal and four digits...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
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
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...
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...
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
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.