Linked OLE Object


M

Michael Lei

Hi All,
I create a OLE object field in a table.
I create a bound OLE object in a form referred to that OLE object field in
the table.
I have set the Bound OLE Object as "Linked" in the property "OLE Type
allowed".
Now the problem is that when I insert a jpg photo in the field, it works.
But when I check the file size of the mdb, the size growths dramatically.

For example, when I insert a jpg photo with 1MB, the file size of the mdb will
growth with 11MB.

It is supposed to store the file lcation only in the field.
What is wrong with my setting.

thanks a lot!

Michael
 
Ad

Advertisements

L

Larry Linson

Michael Lei said:
Now the problem is that when I insert a jpg photo in
the field, it works. But when I check the file size of
the mdb, the size growths dramatically.

For example, when I insert a jpg photo with 1MB, the
file size of the mdb will growth with 11MB.

This is explained in the article that is in the downloads described later...
it's commonly known as "database bloat". Even if you use "Linked" in the OLE
Object, Access and your OLE-enabled registered graphics software will
generate a bitmap-format "thumbnail" in the OLE Object, and, in early answer
to your question, "No, you cannot avoid this using OLE Objects," unless you
move to Access 2007, which purports to have solved some or all of the
database bloat problem
It is supposed to store the file lcation only in the field.

No, you are mistaken... it is supposed to, and does, work as I described
above, when using OLE Objects, as you are. You'll see from the following and
the download examples that there alternatives which allow you to _actually_
store only the file location (but in a text field, not an OLE Object).

the article included with the download
What is wrong with my setting.

You are using OLE Objects and expecting them to work as you think they
should, rather than as they actually do work. That's not "wrong with your
setting", it's just "working as designed" but there are other approaches
that "work as they are designed" without the bloat.

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.

And, Stephen has an ActiveX control available that works in cases where the
graphics filters are not available -- and works better, I've heard, than the
OLE Object and OLE Controls.

Please note that there are other approaches, e.g.,
Application.FollowHyperlink, but those, like OLE and Bound OLE Frames still
leave
you "at the mercy of the imaging software registered for the filetype".

Finally, Access 2007 has enhancements that, reputedly, eliminate the
database bloat long associated with OLE Objects and Bound OLE Frames. But,
it still leaves you relying on the software registered for the image type,
which may not be as "cooperative" as we'd like in creating our display. It
also has the capability of having a variable number of Attachments to a
Record, which may be helpful. But, as I have not done much with it yet, I
certainly wouldn't suggest you rush out and replace an earlier version --
until you have a copy incorporating, at least, the first Service Pack, or
have
the SP in hand and ready to apply as soon as you install Access 2007.

Larry Linson
Microsoft Office Access MVP
 
Ad

Advertisements

M

Michael Lei

Finally, Access 2007 has enhancements that, reputedly, eliminate the
database bloat long associated with OLE Objects and Bound OLE Frames.

Dear Larry,
I have tried to install the Access 2007, the problem can not be solved.

But, it still leaves you relying on the software registered for the image type,
which may not be as "cooperative" as we'd like in creating our display.

Because I have tried to insert other object, such as Adobe PDF file, the PDF
can be shown correctly and the file size of the MDB have not growth
dramatically.
Do you have any suggestion what software I can used to show the image
correctly
and without "bloat" instead of using the Microsoft Photo Editor.

Thanks!

Michael Lei
 

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