dbTalk Databases Forums  

Re: OLE Picture in Access 2002

comp.databases.object comp.databases.object


Discuss Re: OLE Picture in Access 2002 in the comp.databases.object forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kchesk
 
Posts: n/a

Default Re: OLE Picture in Access 2002 - 07-30-2003 , 10:46 AM







hello, actually I had the same question. I can not display a .jpg
picture into a bound OLE object frame, all I get is the filename.jpg
reference. Do I have to set the table value to a text value and not an
OLE object? I have a person I talked to in Arkansas, and he dosent have
these problems. His picture comes up fine. He sent me his database and
I only got the filename.jpg reference, not the picture. Do I have to
set preferences for microsoft access?

im actually using 2000, is this the same for 2002?






Originally posted by Peter Fallon
Quote:
You are in the wrong forum to get an Access question answered.

But ot br brief, the oLE storage in Access is just that - it isn't
storing the image, but a
complete OLE reference to the picture AND the app responsible for it,
which is why you get
amazing bloat in the database as a result. The data type is also OLE,
which is why you cannot
just "view" the data in an image control - you have to tell access to
activate the
application responsible for processing the OLE storage...

IAC, you don't store pictures in MDB files. The most optimal way is to
store the filename in
a text field, and write some code to load the image into an image
control whenever required
using the Picture property of the image control (usually the Form's
Current event). You do
the same thing for reports using the Format event of the relvant
section.


When i insert a picture as an OLE object in my database how come
it
says that it is a package instead of a JPG or picture type of
file ??

When i run the database all i can see is the reference to the
file.
But when i double click on the field, the pictuer will pop up
in
WIndows Picture and Fax Viewer.

WHen i try to edit it by using object packager, it would not
let me
select "picture" option instead it is just under "description"
option.

Even in design view, the fields that contain the OLE PICTURE (i
tries
both embedded and linked) I have to double click it to view my
JPG
picture and it was listed under "package". Shouldnt a JPG
picture be
listed undfer JPG or Image ???

--
Posted via http://dbforums.com


Reply With Quote
  #2  
Old   
Peter Fallon
 
Posts: n/a

Default Re: OLE Picture in Access 2002 - 07-31-2003 , 06:14 AM






This is the wrong place to post such a question.

IAC, the reason you don't see th epicture placed there by someone else is becauase you don't
have the same graphics/picture editor program they do. Its an OLE field, storing an OLE
reference, not just the image. Thus it can only be viewed if you have the same editor
available on your PC.

Broadly speaking, you do NOT use the OLE field in access as it causes database bloat, and is
very awkward to use. Pictures or other documents should be stored on disk alongside the MDB
file, and a path/name referecne stored in you table. You then view them using an image
control and a short bit of code to load the relevant picture every time you change records.

Quote:
hello, actually I had the same question. I can not display a .jpg
picture into a bound OLE object frame, all I get is the filename.jpg
reference. Do I have to set the table value to a text value and not an
OLE object? I have a person I talked to in Arkansas, and he dosent have
these problems. His picture comes up fine. He sent me his database and
I only got the filename.jpg reference, not the picture. Do I have to
set preferences for microsoft access?

im actually using 2000, is this the same for 2002?






Originally posted by Peter Fallon
You are in the wrong forum to get an Access question answered.

But ot br brief, the oLE storage in Access is just that - it isn't
storing the image, but a
complete OLE reference to the picture AND the app responsible for it,
which is why you get
amazing bloat in the database as a result. The data type is also OLE,
which is why you cannot
just "view" the data in an image control - you have to tell access to
activate the
application responsible for processing the OLE storage...

IAC, you don't store pictures in MDB files. The most optimal way is to
store the filename in
a text field, and write some code to load the image into an image
control whenever required
using the Picture property of the image control (usually the Form's
Current event). You do
the same thing for reports using the Format event of the relvant
section.


When i insert a picture as an OLE object in my database how come
it
says that it is a package instead of a JPG or picture type of
file ??

When i run the database all i can see is the reference to the
file.
But when i double click on the field, the pictuer will pop up
in
WIndows Picture and Fax Viewer.

WHen i try to edit it by using object packager, it would not
let me
select "picture" option instead it is just under "description"
option.

Even in design view, the fields that contain the OLE PICTURE (i
tries
both embedded and linked) I have to double click it to view my
JPG
picture and it was listed under "package". Shouldnt a JPG
picture be
listed undfer JPG or Image ???


--
Posted via http://dbforums.com


Reply With Quote
  #3  
Old   
dbaltusavich
 
Posts: n/a

Default Re: OLE Picture in Access 2002 - 10-15-2003 , 01:33 PM




I have run into a similiar problem - and if you are like me, you don't
have the option of "just linking to the file using the file name" or
something like that. My application used Access as a front-end for a
mySQL backend. I scoured the internet and found a few solutions. I
think the best one is to either pin down or write yourself a ActiveX
script that will just load the binary data into the field of your
choosing without adding to it or otherwise comprimising it.



If you are planning on outputting it later, it would useful to somehow
determine the MIMEtype of the binary data, perhaps through the use of
the file name (.jpg, .gif).



If I made further headway, (like finding an activeX control that
actually works, I will re-post.





Originally posted by Dxmetal

Quote:
When i insert a picture as an OLE object in my database how come it

says that it is a package instead of a JPG or picture type of file ??



When i run the database all i can see is the reference to the file.

But when i double click on the field, the pictuer will pop up in

WIndows Picture and Fax Viewer.



WHen i try to edit it by using object packager, it would not let me

select "picture" option instead it is just under "description" option.



Even in design view, the fields that contain the OLE PICTURE (i tries

both embedded and linked) I have to double click it to view my JPG

picture and it was listed under "package". Shouldnt a JPG picture be
listed undfer JPG or Image ???


--
Posted via http://dbforums.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.