Dianne Yumul wrote:
> Hello,
>
>
>
> I'm having a problem with the code below. The program exits when it gets to
> the fetchrow_array() statement. It doesn't print an error message and it
> doesn't die. We checked the temporary table, and it exists with the right
> fields. STDERR shows the "Got here 1.3" line but not the "Got here 1.4"
> line. Is there anything I missed or does anybody have ideas on what can be
> wrong?
>
>
>
> $dbh->{RaiseError} = 0;
>
> $dbh->{PrintError} = 0;
>
>
You just told DBI not to give errors and not to print eror messages.
You want:
$dbh->{RaiseError} = 1;
$dbh->{PrintError} = 1;
>
>
> my $query =
>
> "SELECT addtototalx, addtototaly, addtototalz, addtototald, x, y, z, d,
> units
>
> FROM $temptable
>
> ORDER BY d";
>
>
>
> print STDERR "$query\nGot here 1.1\n";
>
> my $sth_data = $dbh->prepare($query) or die "prepare: $DBI::errstr\n";
>
>
>
> print STDERR "Got here 1.2\n";
>
> $sth_data->execute() or die "execute: $DBI::errstr\n";
>
>
>
> print STDERR "Got here 1.3\n";
>
> my @a = $sth_data->fetchrow_array() or die "fetchrow_array: $DBI::errstr\n";
>
>
>
> print STDERR "Got here 1.4\n";
>
>
>
> Thanks in advance for any help.
>
>
>
> dianne
--
James D. White ([EMAIL PROTECTED])
Department of Chemistry and Biochemistry
University of Oklahoma
620 Parrington Oval, Room 313
Norman, OK 73019-3051
Phone: (405) 325-4912, FAX: (405) 325-7762