http://www.perlmonks.org?node_id=1004751


in reply to DBI don't fetch my data...or at least not all records

Hi!

I can't look at all the details, but there is something I saw at first sight: You don't have error checking on the prepare call. And if your statement is wrong forever reason (e.g. case of the column names) you probably don't get it.

My advice: Do errror checking on every DBI related call yourself or do it just simpler if you don't need your hand on the details of error recovery:

$dbh->{RaiseError} = 1; eval { # do the whole DBI stuff }; if(my $e = $@) { confess("ERROR: What a pitty: Something went wrong: $e"); }

Best regards
McA