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

Storing JPG files

Does anyone have any advice as to how to get JPG images into an OLE
Object field? I have created a table that includes this data type,
and allowed Access wizzard to generate a form. I wish to copy various
images from the web (in my initial trials, I copied the files to my
PC), and which generally seem to be JPG files. However, Access
(Access 2000 ver 9.0.2720) does not seem to be able to cope with this.
When I attempt to insert the image (Insert | Object), the form
displays the filename, not the image (double-clicking at this point
does reveal the image, but I’d rather not do this). I can convert the
JPG file to BMP using Paint, but the quality of the image is lost.
Possibly I’m overlooking something. I was really hoping I could copy
& paste the image (ie. Ctrl-C, Ctrl-V) directly from the web and into
my database. Any help would be appreciated.

Ron
Nov 13 '05 #1
6 7692
<st**********@netlink.com.au> wrote
Does anyone have any advice as to
how to get JPG images into an OLE
Object field?


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.

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.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #2
> and allowed Access wizzard to generate a form. I wish to copy various
images from the web (in my initial trials, I copied the files to my
PC), and which generally seem to be JPG files. However, Access
(Access 2000 ver 9.0.2720) does not seem to be able to cope with this.
What are you planning to do with those images...?
When I attempt to insert the image (Insert | Object), the form
displays the filename, not the image (double-clicking at this point
does reveal the image, but I?d rather not do this). I can convert the
JPG file to BMP using Paint, but the quality of the image is lost.
Possibly I?m overlooking something. I was really hoping I could copy
& paste the image (ie. Ctrl-C, Ctrl-V) directly from the web and into
my database. Any help would be appreciated.


You really don't want to store images in a database. There are a lot
of really good reasons not to, but what people tend to do instead is
store the jpeg somewhere in the file system, and put a link to it in
the database. Then your form can open the image and display it when
you need to.
Nov 13 '05 #3
st**********@netlink.com.au wrote:
Does anyone have any advice as to how to get JPG images into an OLE
Object field? I have created a table that includes this data type,
and allowed Access wizzard to generate a form. I wish to copy various
images from the web (in my initial trials, I copied the files to my
PC), and which generally seem to be JPG files. However, Access
(Access 2000 ver 9.0.2720) does not seem to be able to cope with this.
When I attempt to insert the image (Insert | Object), the form
displays the filename, not the image (double-clicking at this point
does reveal the image, but I’d rather not do this). I can convert the
JPG file to BMP using Paint, but the quality of the image is lost.
Possibly I’m overlooking something. I was really hoping I could copy
& paste the image (ie. Ctrl-C, Ctrl-V) directly from the web and into
my database. Any help would be appreciated.

Ron


Example for handling images in Access 2000, do not use OLE objects,
store the path instead.
http://www.trevor.easynet.co.uk/down...Images2000.zip
--
This sig left intentionally blank
Nov 13 '05 #4

What are you planning to do with those images...?


I have been looking at real estate on the web. The info posted by
agents often includes images of the property. I intend to copy
various details (including the associated images) from the agents' web
sites from properties I am interested to an Access database. This
will allow me to add my own notes and make comparisons etc. The
images would remind me of the property better than the text.

It seems to me, but I may be in error, that storing the images in a
table(s) may be a cleaner method. Linking may be my final solution,
but I may well end up with thousands of pictures this way; though I
suppose separate sub-directories for each property may be okay.

Ron
Nov 13 '05 #5
> sites from properties I am interested to an Access database. This
will allow me to add my own notes and make comparisons etc. The
images would remind me of the property better than the text.
Very interesting! Is it working out?
It seems to me, but I may be in error, that storing the images in a
table(s) may be a cleaner method. Linking may be my final solution,
but I may well end up with thousands of pictures this way; though I
suppose separate sub-directories for each property may be okay.


Well it depends what your priorities are. Access isn't terribly good
about managing it's file-size to begin with, but if you send your
robot to collect everything it can find on real estate wherever you're
interested in, it's going to find tens or hundreds of thousands of
image files. When you store these in BLOBs in the database, you'll
have an mdb that's hundreds of megs or more. And the way Microsoft
uses scatter IO - tables written across the whote file - it's going to
take longer to query the more you find.

It'll still take space to store the files either way, but the file
system is optimized for this, and a database isn't. Access ( or SQL
Server ) will break the file apart into database pages and write it
out like that, then put it back together when you query it up.

You can store the files in sub folders by site, keyword, or whatever
is most interesting, and then have a field in your table that links
back to where the file is. The user could delete files through your
form, which will let you kill the row in your table and the file.
Nov 13 '05 #6

Very interesting! Is it working out?
Not yet. I got the download okay, but haven't had success with it.
As it is, when I open the form to display the images, it gets stuck on
the same image. I haven't yet investigated, but it behaves as though
the first image which is loaded is copied to each record in the table.
Despite the fact that I may have loaded three or four images, as I
move through subsequent records the same image is shown.

about managing it's file-size to begin with, but if you send your
robot to collect everything it can find on real estate wherever you're
interested in, it's going to find tens or hundreds of thousands of


I'm not going to get so sophisticated. These properties will consist
of either places I have personally inspected or ones I just want to
record for future reference (price comparisons). I'll go to the
agent's web site, and grab the details before they drop off the
agent's web site.

Ron
Nov 13 '05 #7

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

Similar topics

7
by: Benoit St-Jean | last post by:
I am looking at options/ways to store 12 million gif/jpg images in a database. Either we store a link to the file or we store the image itself in the database. Images will range from 4k to 35k in...
3
by: Dave Smithz | last post by:
Hi There, Being quite new to MS-SQL I would like to ask if there is a general opinion of what approach should be taken to storing things like external documents and images in databases. ...
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...
1
by: RAB | last post by:
I want to scan documents and then store them in an Access database. What file type would I want to scan the document as? Would I want to store the document file in the database or a path to the...
9
by: Adam J Knight | last post by:
Hi all, Just wondering whats everyones prefered method of storing images ? 1) File System 2) Database (SqlServer) (Seems to be easier, but has a performance hit) Appreciate some insight!!!...
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...
9
by: KarlM | last post by:
After reading some articles regarding confuguration data I'm a bit confused. Where is the right place for storing configuration data? - XML-files? - registry? - INI-files? (from a users point...
3
by: Lucky_Syringe | last post by:
I wrote this script to display different files from a database and properly display them by their respective MIME types. I have two questions: the first is that it just so happens not to work, and...
10
by: deciacco | last post by:
I'm writing a command line utility to move some files. I'm dealing with thousands of files and I was wondering if anyone had any suggestions. This is what I have currently: $arrayVirtualFile =...
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: 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...
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
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
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
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...

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.