How do I export picture objects from Access2000 to SQLServer7?

R

Robin Pearce

I am trying to migrate picture OLE objects from Access2000 to SQLServer7.
There are two apparent types of origin of the picture objects, from
METAFILEPICT, and from MS PhotoEditor 3.0.

As some of the BLOBs are large I used the GetChunk/AppendChunk methods to
write each BLOB to an individual image file as an intermediate step, but
cannot open them with any standard application. Access presumably "wraps" the
data with some extra bytes.

I presume the files must be reconstituted as valid image files before
importing to SQL Server?

Any help or advice appreciated,
Robin Pearce
 
S

Stephen Lebans

John I just added support today for embedded OT_STATIC images(DIB and
METAFILEPICT). I will be posting the new version later tonight or tomorrow
when I finish the final testing.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
R

Robin Pearce

Stephen,

I downloaded ExtractInventoryOLE57 which appears to work for every OLE I
have except METAFILEPICT - I take note that you are testing this feature, and
would like to know when the new version is ready.
Unfortunately the Access project bombed out on hitting the first object of
the above structure, and I could not get the single-object extract option to
work, it seemed to be hard wired to your sample data: is the single feature
in development or else how does it work?

thanks for the help, Robin P
 
S

Stephen Lebans

I finished the new version late last night and it is being tested this
morning by the user who requested support for embedded STATIC Picture
objects( METAFILEPICT and DIB). I'll post the new version this afternoon.
Send me an MEail if you need it this morning.
(e-mail address removed)


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
R

Robin Pearce

Stephen,
I tested ver.65 this morning and would like to give some feedback, hopefully
constructive.
The inventory option lists 45 images correctly. The first is
OT_STATIC/Picture, followed by three MSPhotoEd.3/PhotoEditorPhoto.
On running the extractor, the first image extracts to bmp file but is
heavily pixelated with red rectangles spotted across the image (the source
imbedded image in the Access page looks fine).
The second image extracts ok and the picture quality is fine, but the
lefthand fifth of the image is transposed to the righthand side of the
extracted picture!
The third image extracts without problems.
On extracting the fourth image, the Access project itself hangs up and a
generic MS message tells me Access Must End Now.
If it would help, I can provide further details, including some data (off
post) if required.
Robin
 
S

Stephen Lebans

Hi Robin,
can you send me the table with the first dozen or so Images? Please make
sure you ZIP the MDB before you EMail it to me.
It sounds like two issues:

1) THe images are at a Bit depth that I currently do not support. I don't
think I've come across a 16 bit Image yet for instance.

2) The GPF sounds like an unsupported format that is somehow passing through
my expception filters as a supported type.

The last update was a major update with significant logic changes that have
not been fully tested. The GPF you mentioned should not happen so I will be
glad to see how your Images are cuasing it.
Email to:(substituting appropriately)
(e-mail address removed)

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
S

Stephen Lebans

Robin I have time today if you can get me your table as I indicated in my
last post.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
S

Stephen Lebans

Thanks for the samples Robin. I found the error in my logic. Bitmaps must
always be DWORD aligned. All this means is that the ending address for a
single row of the Bitmap must be divisible by 4 or else you add padding to
make it so. SInce this is the published spec I mistakenly thought MS Photo
Editor would respect this. By chance I had only tested Images that were
naturally DWORD aligned. Your Images were not.

I'll post the update this weekend. I want to clean the code and some more
error handling while I'm at it. Might even be able to generate the first
production release or at least the final Beta version.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
S

Stephen Lebans

Robin I fixed the DWORD alignment issue. All of the sample images you sent
me extracted properly.

I decided to add the ability to use a Query in addition to a Table and ran
into a small problem with my custom List filling functionality. I won't get
time to fix this until tomorrow. If you can't wait send me an Email and I'll
send you a working version(without the Query support).

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
S

Stephen Lebans

New version posted tonight.
http://www.lebans.com/oletodisk.htm
NEW - Feb 06/2006 ExtractInventoryOLE.zip A2K or higher ONLY! This
version saves the entire contents of a table containing OLE Objects to disk.
Does NOT require the original application that served as the OLE server to
insert the object. Supports all MS Office documents, PDF, All images
inserted by MS Photo Editor, MS Paint, and Paint Shop Pro. Also supports
extraction of PACKAGE class including original Filename. Contains function
to produce a full Inventory of the OLE field including LINKED path and
Filenames. Uses Structured Storage API's to read the actual contents of the
field. Version BETA 1.56

History

BETA 1.75 Feb 06/2006

Fixed Bitmap DWORD alignment issue. Added support for both 8 bit color and
Greyscale embedded images. Added support for MS Photo Scan files. Fixed
numerous bitmap related logic bugs. This version has worked on every single
OLE image object embedded by supported apps that users have sent me to test.
If I told you previously I would not support your image type I lied...they
are all now supported. ListBox selections now only show supported
tables/fields. Cleaned and commented code. This will be the last Beta
release as I believe I have swatted all of the major and minor bugs. It has
not crashed once in several days.<grin>


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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