This function retrieves an attachment from the specified schema entry. The field ID specified should be an attachment field type. The locType parameter can be used to specify whether you want the attachment returned incore (ARS::AR_LOC_BUFFER) or written to a file (ARS::AR_LOC_FILENAME). If you choose to write it to a file, you must specify the locFile parameter.

On success
returns 1 if locType == AR_LOC_FILENAME
returns a scalar buffer if locType == AR_LOC_BUFFER
On failure
Returns undef.


  ars_GetEntryBLOB($c, "00-Test", "000000000000001",
		   "/tmp/attachtest") || 
		     die ("GetEntryBLOB: $ars_errstr");

  my $a = ars_GetEntryBLOB($c, "00-Test", "000000000000001",

  die "GetEntryBLOB: $ars_errstr" if(!defined($a));
  print "blob size = ".length($a)."\n";
  open(FD, ">/tmp/attachtest2") || die "open: $!";
  print FD $a;

A subsequent comparison of the two files /tmp/attachtest and /tmp/attachtest2 should show that they are identical.

<-- Table of Contents

Last changes to this page 9th March 1999 by jeff murphy
© J.C.Murphy, J.W.Murphy 1997