?
Solved

OLE datatype

Posted on 2011-04-28
9
Medium Priority
?
31 Views
Last Modified: 2016-05-16
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.
0
Comment
Question by:huBelial
  • 4
  • 2
7 Comments
 
LVL 26

Expert Comment

by:Nick67
ID: 35489164
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
 

Author Comment

by:huBelial
ID: 35489215
I understand but I still want to know why its doing that.
0
 
LVL 26

Assisted Solution

by:Nick67
Nick67 earned 1336 total points
ID: 35489239
I think this explains things

http://support.microsoft.com/kb/205635
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
LVL 26

Accepted Solution

by:
Nick67 earned 1336 total points
ID: 35489274
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
 

Author Comment

by:huBelial
ID: 35492679
I retrieve the images programmatically so the double-click doesn't really apply in my case.  
0
 
LVL 26

Expert Comment

by:Nick67
ID: 35492712
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
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 664 total points
ID: 35507006
<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

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question