in reply to Can't crack a DBI Error:

instead of using "unless($sth->execute)", try using:
$sth->execute() or die "SQL query failed: $sth->errstr \n$sql";
I can't say why your method would not work but I can say I have not had a problem at all with the "or die" method above.

Replies are listed 'Best First'.
Re: Re: Can't crack a DBI Error:
by Hammy (Scribe) on Sep 24, 2002 at 02:51 UTC
    Thanks, but that is not where the problem is. The error occurs on the fetch - I switched it around as sugggested and still get the same error - any suggestions?