On Fri, 06 Dec 2002 06:50:57 -0500, Brad Smith wrote:
>I was just looking at the 'longbin.pl' test script that is bundled with
>DBD::ODBC, which has raised a few questions:
Hmm... I don't seem to have it, but I could find it on CPAN.
<http://search.cpan.org/src/JURL/DBD-ODBC-0.45_18/mytest/>
>1. To place a blob in an Access database, as per the example script, is
>it necessary to use the Digest::MD5 module, or is it's use an optional
>step that is ultimately suggested?
Heh?!? Don't be silly. It's not necessary at all. Digest::MD5 is module
to create some kind of checksum, much like CRC but bigger (128 bit or 16
bytes, often displayed in hex (32 characters) or base64 (Jee, I don't
know... 22 or so. time 4/3 and round up)) It's one way to check if all
bytes in a large binary string of data is intact. Any bit that changes
will result in at several bits of the checksum flipping. All small
corruptions will be detected. If your data has the same length and the
same checksum as calculated earlier, you may be virtually sure that your
data is still intact.
>2. Unlike a text field or an integer field (etc.), a blob field has both a file
>name and file data. When reading the data, as per the example, I see
>that the SELECT statement gets just 'picture'. At what point does it
>parse the file name from the file data?
A blob is a binary string. It will only contain the contents of the
file. If you want to store other features, like the file name, size, MD5
checksum, modification date, ... then you need to provide more fields
for those. It's that simple.
>Having not ever used the Digest::MD5 module, I suspect that it is what
>handles all of this, but I just wanted qualified verification before I dove
>in and got too deep.
It does nothing of the kind.
--
Bart.