PDA

View Full Version : Access loads a bitmap into a OLE object as a package


VBNomad
Jul 26, 2006, 07:56 AM
My client has 3 aging Access 97 dbs that run the production floor of a large plastic manufacturing plant. These are in the process of being replaced by much more robust, professional grade manufacturing control systems. The client is investing millions in the new systems, so redesign at this point is not an option, nor is upgrading to some newer version of Access. The application keeps small bitmap images in the database to show the types of defects existing in finished products. This has been working fine for several years, and now I need to add one more bitmap for a new code. Every time I try to load the bitmap into an OLE object field, it changes to a 'package' and will not show when extracted from the database.

What is Access reacting to that causes it to load a bitmap as a 'package'?

[This basic question was asked back in February and closed without any real answer. So I'm asking about it again.]

VBNomad
Jul 26, 2006, 11:15 AM
Found a workaround if there is data in the table already (my clients case). Copy the "Bitmap Image" Ole Object from an existing row, and past it into the new row. Then open it and cut and paste the new bitmap into MS Paint. Then use the save to table option from Paint. It save the new image to the table, but because it was originally a bitmap, it stays that way instead of turning to a 'package'.
What it is doing I still don't know, but at least I have my bitmap in the table now.

ScottGem
Jul 26, 2006, 04:23 PM
Its good you found a workaround. But I can tell you that the database was not designed according to best practices. Actually embedding bitmaps in an Access database will cause database bloat and cause performance problems. The recommended method is to store the path to the image file as part of the record and use an unbound Image control to display the image file.

I mention this in case anyone else sees this and tries the emulate the design.