OLE - Package Issue - New Tread - Please Help

G

Guest

I am starting over so I cna clear up the issue.

I have created a table with an OLE filed called image. When I embedd or
link a bitmap image I get the word "Package" in the field instead of "Bitmap
Image." Now, I have gone through the steps listed in the knowledge base
article to resinstall Microsoft Photo Editor which is supposed to correct
this problem. even after reinstalling the photo editor and rebooting, my
image field still shows "Package" How do I correct this so it will show
Bitmap Image when I link or embedd a bitmap image? I need it to show bitmap
image so that my label program will display the image (my label program is
linked to my access database). I had all of this working earlier until I
tried to embedda jpeg, since then everything shows up as a package when it
should not. How do I fix it?

Thank you
 
S

Stephen Lebans

1) Open any folder containing Bitmap files in Windows Explorer.
Double click on a Bitmap file
Which application opens to display the file?


2) Go through your normal routine to insert an image. This time select NEW
PaintBrush picture as the object type. Draw something so you'll know it is
the image you produced. Exit MS Paint and return to Access. Double click in
the OLE Field for the record you just added. Does MS Paint appear displaying
the image you just created?

I have just tested in A2003, if MS Paint holds the registration for BMP then
I can embedd objects of type Bitmap Image and PaintBrush Picture and they
are both properly using MS Paint as the OLE server to redisplay/edit the
inserted object. I can also select an existing BMP file from the File
Explorer via the Browse button and the BMP is correctly inserted and linked
to MS Paint.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
B

bob

Photo Editor isn’t the issue here, and there’s more to it than just selecting the associated application…

If you are running Windows XP:

In Explorer:

Tools -> Folder Options

Switch to the ‘File Types’ tab.

Click the ‘New’ button.

Click the ‘Advanced’ button in the ‘Create New Extension’ dialog.

Enter ‘bmp’ as the file-type. Select ‘Bitmap Image’ as the associated File Type’.

Click ‘OK’ – if you get an ‘Extension is in use’ warning click ‘Yes’.

Select ‘BMP’ in the list of registered file types.

Click ‘Change’ and select ‘Paint’ as the application.

Run Access and insert a bmp in a field – you should now see ‘Bitmap Image’.
 
G

Guest

Ok, Everything is working fine now except that my picture does not show up in
my external label program. I have my .bmp files associated with MSPaint.
Now, I went in and changed the association to MS Photo Editor and they now
open up in MS Photo Editor. However, when I open them up in access they are
still associated with MSPaint and I think this is whay they are not
displaying on my labels. How do I get Access to use MS Photo Editor as the
OLe server vs Paint?

Thanks
 
B

bob

Didn't you say that you needed the images to be stored as 'bitmap image' in order to work with your label
program?

Once they are stored as one type (eg 'bitmap image') they will continue to open with the associated application
(eg paint), irrespective of the current file association on the system. If you change the associations
on the system to Photo Editor then any images you load subsequently will be of that type; it will not affect
images already stored in the database.
 
S

Stephen Lebans

Hey Bob,
as far as I undertand the mechanics of OLE, the registry contains a table of
registered OLE Server apps and their respective GUID ID's. This ID is stored
in the Moniker stream in the OLE storage and used to link the
embedded/linked object back to application used to insert the object
originally. I've never heard of this table becoming corrupted but this is
the third time in the last few weeks that someone in the NG's is unable to
use MS Paint as an OLE Server. Wish I could duplicate the error here to see
where the problem lies.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
B

bob

The problem lies simply in applications having been installed that modify the file registrations – there’s
nothing new about it, but it’s not simply the extension-to-application mapping that’s the problem. The
named file-type needs to be correct as well. It’s quite possible, for example, to have Paint as the app
associated with ‘bmp’, but when you insert a bmp file in Access you get a Paint Shop Pro Object, or a Package
(as in this case).

Here’s one way you can reproduce it (instructions for Windows XP):

In Explorer:

Tools -> Folder Options

Switch to the ‘File Types’ tab.

Click the ‘New’ button.

Click the ‘Advanced’ button in the ‘Create New Extension’ dialog.

Enter ‘bmp’ as the file-type. Select the blank entry in
the ‘associated File Type’ combo (it’s the first item in the list).

Click ‘OK’ – if you get an ‘Extension is in use’ warning click ‘Yes’.

Select ‘BMP’ in the list of registered file types.

If Click ‘Change’ and select ‘Paint’ as the application (if not already set to ‘Paint’).

Run Access and insert a bmp in a field – you should now get a Package in the field, even though Paint is
associated with bmp, bmp files open with Paint etc.
 
B

bob

How do I get Access to use MS Photo Editor as the
OLe server vs Paint?

Follow the same procedure as below, but instead of choosing 'Bitmap
Image' as the 'associated file type', choose 'Microsoft Photo Editor
3.0 Photo'. This will only effect new items that you insert into
Access.
 
G

Guest

Unforunately this does not work. The new images I bring into Access still
open up in Paint. Any other suggestions that might work?
 
B

bob

Right-click on a .bmp file and choose ‘Properties’.

Check what is displayed next to ‘Type of File’ – it should now say ‘Microsoft Photo Editor 3.0 Photo’.


If it does not, then the change you made was not successful. Try it again exactly as follows:

1) Explorer->Tools->Folder Options
2) Select ‘File Types’ Tab
3) Click ‘New’
4) Type ‘bmp’ in the ‘File Extension’ box
5) Click ‘Advanced>>’
6) Select ‘Microsoft Photo Editor 3.0 Photo’ from the ‘Associated File Type’ list.
7) Click ‘OK’
8) Click ‘Yes’ if prompted (and you should be) with the ‘Extension is in use dialog’
9) Click ‘OK’ to close the ‘Folder Options’ dialog.

Now you should see ‘Photo Editor 3.0 Photo’ as the ‘Type of File’ in the properties of a .bmp file, and
bmp files should insert as Photo Editor Objects in Access.

--
_______________________________________________________
http://www.ammara.com/dbpix/access.html
DBPix 2.0: Add pictures to Access, Easily & Efficiently




=?Utf-8?B?U2Vhbg==?= said:
Unforunately this does not work. The new images I bring into Access still
open up in Paint. Any other suggestions that might work?
 
G

Guest

I did do it twice before just as you outlined but it failed. This time I did
it again, then compacted and repaired the db and now it works. Thanks for
all of your assistance.
 
S

Stephen Lebans

Ok I see what is going on now. When the Access host container goes to insert
the existing BMP file it tries to find the registered OLE server that can
handle this file format :
1) First Access checks to see if the file is a valid Structured Storage
file. If so it tries to get the CLSID.
THis fails as a BMP file is not a compound file.

2) Access then tries to associate the extension of the file,"bmp" with a
ProgID in the registry. It then uses this ProdID as an index into
ProgID\CLSID entries. If the matching entry has an Insertable subkey then it
tries to start the OLE Server for this CLSID.

If the process fails at any point then the Packager object is invoked to
insert the selected file as a Package object.

The file extensions can be found at the top of HKEY_CLASSES_ROOT. I watched
the relevant Keys(.bmp, PBrush, Paint.Picture) via RegEdit to see what
happens as you change the file association for BMP to other applications.

Using your example leaves a nonsensical value in the HKEY_CLASSES_ROOT .bmp
entry. In my case it was an IAS related entry. I'm not sure if it simply
picks up the first Key originally entered in this section or it was purley a
random choice. I ran out of time to test.

More than I wanted to know.<grin>

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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