On 11/8/06, Bart Lateur <[EMAIL PROTECTED]> wrote:

I've been saving picture files that had been stored in a blob field in
an MS-Access database (aka an "OLE Object") to files, and I've bumped
onto some LongReadLen related problems: through trial and error I
finally succeeded in making LongreadLen long enough to reliable extract
all the files. (in Access, the function LEN on such a field reports a
size that's half the number of bytes. Apparently it mistakes it for
Unicode text. I haven't found a better suited function than LEN, though
I haven't searched hard).

Anyway; as this was a process of several minutes, it took some time to
fix the script and start all over.

So I was wondering these two things:

1) What's the best way to temporarily disable RaiseError when I want to
have it enabled for the rest of the script? Say, for one SQL statement?


$sth->{RaiseError} = 0;

Or:

$dbh->{RaiseError} = 0;
$dbh->do("something that might fail");
$dbh->{RaiseError} = 1;

And 2), in a fetch loop, is it possible to adjust a property like
{ReadLongLen}, and retry the same fetch without restarting the whole
loop? Because this error  typically happened several minutes into the
loop.


Highly unlikely.  The data has been fetched - and truncated.  There's not
usually a way to refetch the same row - unless you have a scroll cursor, and
DBI doesn't have support for those.

--
Jonathan Leffler <[EMAIL PROTECTED]>  #include <disclaimer.h>
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."

Reply via email to