It's possible to manipulate Access as an OLE object using Win32::OLE. This is essentially using it as an OLE automation server. You'll have to familiarize yourself with the MS Access object model, of course.

Not too long ago, I was faced with the task of printing customer invoices, each of which consisted of a variable number of (from five to seven) separate PDF files, which were generated by our system. These had to be collated in a particular order, which depended upon the individual invoice.

My solution was a perl program running on a dedicated NT box, which instantiated an Acrobat COM object (OLE automation server), and called methods on that object to Open, Print, then Close each file in sequence.

In your case (you'll need to investigate Access' object model to be able to do this), you'll want to open your database, then for each image you want to insert, select the relevant row (record) in a result set, instantiate an appropriate object type from the file containing the image, and then update the appropriate column (field) of the result row with that object.

This can all be done from Perl :)

It's rather tedious wading through Microsoft's docs, looking for info about the Access object model; which properties, collections, etc., to use. but it's worth all the trouble when you have a working automated solution.


In reply to Re: Handling pictures with DBI and Access by dmmiller2k
in thread Handling pictures with DBI and Access by kevin_i_orourke

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.