OLE datatype

I have a question about using the OLE datatype in Access 2007. So if I drag and drop an image into an OLE datatype column, the image will be stored as a package. But when I create a program and store an image into an OLE datatype column programmatically, the image will be stored as long binary data.

Whats the difference? Are they stored different? Are there any conversion involved?


When storing it by drag-and-drop, the extraction resulted in blank images.
It extraction works fine when I store the images programmatically.
huBelialAsked:
Who is Participating?
 
Nick67Connect With a Mentor Commented:
If stuff gets stored as packages, by rights the appropriate program is supposed to open when you double-click it.
Long binary data doesn't work with a double-click because Access didn't know from what program created it, and therefore can't fire it up.

The OLE servers are fussy monsters though--especially for images.  The MS Picture Manager is the prefered server.  If it isn't installed, double-clicking doesn't play nice.  Sometimes drag-and-drop looks like it works, but doesn't and is just corrupt data.

With the long binary data, nothing corrupts it, and you are pulling it out progammatically, so it works.

Just don't do it!
0
 
Nick67Commented:
You stand upon the brink of great and painful evil.
Don't use OLE data types.
Don't use the new-fangled attachment types either.

Store your images in folders, save the path in a table and use the .Picture property of Image controls to use them
Google it.  Nobody recommends what you are attempting.
http://www.jamiessoftware.tk/articles/handlingimages.html
0
 
huBelialAuthor Commented:
I understand but I still want to know why its doing that.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Nick67Connect With a Mentor Commented:
I think this explains things

http://support.microsoft.com/kb/205635
0
 
huBelialAuthor Commented:
I retrieve the images programmatically so the double-click doesn't really apply in my case.  
0
 
Nick67Commented:
You asked
<So if I drag and drop an image into an OLE datatype column, the image will be stored as a package.>

I explained :)

OLE Filters and servers are fussy things.  When you do it programmatically these are mostly bypassed or controlled.
0
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
<I understand but I still want to know why its doing that.>
Then you will have to tell us a bit about how you are doing this "Problematically"

I, like Nick67, have long since given up on figuring out why OLE fields sometimes behave erratically....


I use something like this (Linking to the image path) and have never had to worry about Packages, Binary files, BLOBS, Compression, File associations, Extraction issues, Bloat ...or any of the myriad of OLE errors...
(Basically only one line of code to do this: Me.ctlImage.Picture = Me.txtImgLocation)


JeffCoachman

Access-BasicLinkOpenImageDialogB.mdb
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.