On Fri, 1 Jul 2005, Steve Gross wrote:

> Is there a resource for using Perl to save and extract images from a 
> Microsoft Access database?  I've looked in CPAN but I don't see 
> anything.

I'm not a Windows programmer and haven't used Perl with Access, so this 
won't be the answer you're looking for.

But, that said...

With MySQL and other databases, I've seen good arguments for *not* 
storing binary data such as images directly in a database. In many 
cases, it's much easier to store the images as regular files on your 
filesystem, and use the database to store references to those files.

So, for example, if you were building a web site that had a company 
phone book, you could have database fields for things like name, title, 
phone number, email, office location, etc, along with the filesystem 
path to a JPG image of that person. When the CGI script (or whatever) 
is called to present this person's page, it looks up the filesystem path 
as well, and converts that to a suitable <img src="..." /> tag. 

Depending on your application, this may or may not make sense, but it's 
worth considering, as it can make things much easier to manage. 


And with *that* said, if you do feel it's necessary to keep the data 
directly in Access, the same general techniques used for MySQL or any 
other database should, in general, still apply, provided that you're 
using the DBI database abstraction module. If you can't find anything 
specific on getting binary data into Access with Perl, you may be able 
to make use of instructions based on MySQL, PostgreSQL, Oracle, etc. 
 


-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to