Embedding pictures in a DB

G

Guest

I need to embed pictures in my DB; a field in one of the tables is a OLE
Object type. In the data entry form, when the field is selected, and "Insert
Object..." clicked, and a picture selected from the "Browse..." option, it
*only* appears as an icon. The "Show as icon" box is NOT checked. This only
is happening with formats other than .bmp . I've checked the image filters
installed, and yes, .jpg (my preferred format) is installed correctly.

What can I do to get the pictures to display, instead of the icon? I've
tried looking through the Object Packager, and it doesn't seem to know what
to do with .jpgs, although the appropriate editing program does launch when
double-clicking the object frame.

I've been running around everywhere trying to figure out how to get them to
show! Thanks in advance for the help!
 
A

Arvin Meyer

You'll need the proper filter and a registered OLE server to display your
jpg's. You don't say which version of Office/Access you are using. There are
some limitations and filter changes in later versions. Have a look at:

http://support.microsoft.com/default.aspx?scid=kb;en-us;210396

http://office.microsoft.com/en-us/assistance/HP051890871033.aspx?Product=acc2003

Also, you may have better luck with an image control, or even better, don't
embed them at all, just store the paths. If you don't mind spending for a
3rd party control, you can check out DBPix, which stores in the most
efficient manner.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
A

Arvin Meyer

Take a look at my PictureMgr sample application.

http://www.datastrat.com/Download/Picture2K.zip

for a way to link to images.

As far as the "right" OLE server, that's not the problem. Some applications
are only OLE clients amd don't have the ability to act as a server service
for some or all images. Try registering jpgs to MS-Paint, if you don't think
your other programs may not be OLE servers.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
G

Guest

Nice app. I tried re-associating msPaint with Jpg files but that had no
effect. I think I will just link to the files, even though that will make
maintenance and deployment a headache! :)

Thanks for your help!
 
G

Guest

Josh E. did you ever figure out what to do?

I have a similar problem with Access 2000 (Office 2000) whereas I try to
place an OLE object (in this case a .bmp file - bitmap image file) and I
always get 'Package'. I believe this is true of my .jpg files as well.
However I think my problem is associated with eFax software I installed. It
associated all photo type file as type eFax Document which I believe packages
things. I've since uninstalled eFax software but it hasn't done the trick in
fixing my problem. I know this is not an Office 2000 or Access 2000 problem
because I use the same product at work with XP....the same as at home. My
problem is with my home PC. It works fine at work.

I have found a work around which does put the bitmap image into the field
but its not done the normal way by simple choosing clicking the .bmp file.
 
G

Guest

Oh...one other thing. I didn't have the need to place pictures in my DB
until recently. I also installed XP service pack 3 prior to the need. So
not completely sure whether it was the eFax stuff or the service pack that
may have created my problem.
 
G

Guest

Well...I resolved my issue with embedding pictures in my Access 2000 Database
associated with the OLE Object type. For others that may have the same
issues this was the problem and how I resolved it:

OS Platform and Office Product:
using Microsoft XP Home Edition with service pack 2 installed, Microsoft
Office 2000 Professional Edition with service pack 3 installed.

Problem:
When attempting to embed an OLE Object (specifically pictures such as a
bitmap image) in an OLE Object Type field, it would show up as 'Package' as
oppose to 'Bitmap Image' in the field. This would cause a very skewed and
unmanageable photo image in my Bound Object Frame control on my Form. It
would also be blank when I tried the link option box from the dialog box when
inserting the OLE object. In other words it wasn't working right.

Cause of Problem:
Uncertain what caused the problem. I believe the registry entries may
have changed when installing and uninstalling eFax software from j2 Global
Communications. All photo type files continued to be associated with a file
type of 'eFax Document'. UGH!!! When I would double click on a picture
file, eFax's Viewer would come up with the photo. Alternatively I thought
that perhaps I had a graphic filter problem and/or OLE server issue. It
turns out that the registry did not have the proper string entries in the
HKEY_CLASSES_ROOT for .bmp key.

Resolution:
I edited the entries for the .bmp key with strings as follows:

Key Name: HKEY_CLASSES_ROOT\.bmp

Value 0
Name: (Default)
Type: REG_SZ
Data: Paint.Picture

Value 1
Name: PerceivedType
Type: REG_SZ
Data: image

Value 2
Name: Content Type
Type: REG_SZ
Data: image/bmp

I then restarted the system and retried Access and the OLE object type
insertion...IT WORKED!!!!!!!

To figure it out I ended up looking at the registry entries for the
HKEY_CLASSES_ROOT\.bmp key on two different systems running Windows XP.
Although the two different systems were running Access 2000 and Access 2002
respectively, they both had these string entries in common. So I tried it!!!

I'm guessing that one basically needs to have these settings so that
Microsoft's picture viewer is used....at least thats what comes up now along
with the picture when I double click on the filename. ...when I double click
on the OLE object field in the database, Microsoft's Paint comes up with the
picture. This was the normal behavior on the other two working system who's
registry entries I examined.
 
G

Guest

Arvin,

Your sample program is great as are your suggestions. But Access does not
seem to be able to deal with larger image files, regardless of linking or
embedding method. The OLE server may be part of the problem (MS Photo Editor
for example cannot display images using more than 32MB of memory). Have you
run into this problem? Can the OLE server be altered?
 
G

Guest

Download a copy of Office XP from Bittorrent and then install JUST Photo
Editor. Don't install the rest. It will register Photo Editor for OLE in
Access and then it should work. A shame MS is encouraging you to use their
OLDER products since they BROKE the functionality in their newer office apps.
The amazing thing is that MS still hasn't addressed this in Office 2007!!!

Make sure to go to
http://www.microsoft.com/office/com...8ada&catlist=&dglist=&ptlist=&exp=&sloc=en-us
and notify MS of their PROBLEM/ERROR/BUG/FLAW/ISSUE/GAP/MISTAKE - Not sure
how to phrase it enough times so that MS understands that this is an issue
that hasn't been addressed in 2007 yet. OH YES, I KNOW it is a BETA - fact
is MS really only cares about the ribbon - they will not be adding
functionality or anything worth while in 2007 to address the many flaws or
gaps in the previous versions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top