Access package datatype (linked picture) - Can I extract the file path to the link?
Posted on 2006-03-31
I have an existing Access 97 application that needs to be upgraded to Access 2003 and moved to a different server. Because of the age, it is using the older Microsoft Image OLE Server from Eastman / eiStream. When adding a record on the old system, the user would right mouse on the Bound Object Frame, and select menu item Package Object > Edit Package. This opens the Object Packager dialog. The user selects File > Import which opens a file selection dialog. The user selects the file, and exits the Object Packager.
I still can't figure out if it is saving a link or embedding the object, I think it is the latter. When I first opened the application, the IMBTHUMB.OCX was missing. When double clicking on the bound object, a dialog would open saying it could not find the image file and gave a path from the old server. All the images (.JPG) are in a directory.
All the users want to know is if the JPG file exists for each record. Because the database column is of datype OLE Object, and the ObjectPackager was used, I can't extract the filename.
What I want to do is -> write code in Access that I can launch from a button that will get the JPG object from the database and somehow extract the filename or pathname. I can then store this name in the database in a String column, and modify the form to show the JPG using Microsoft Picture Viewer (outside of Access). I might be able to programmatically use the ObjectPackager, but I don't know what library I need to include, or if it even has an API.