Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: error in sql query while using DBI

by pc88mxer (Vicar)
on Jul 16, 2008 at 16:33 UTC ( [id://698067]=note: print w/replies, xml ) Need Help??


in reply to error in sql query while using DBI

I don't see any obvious problems, but I would make your script produce more verbose output so it is clear what is going on (at least for debugging purposes):
open(FILE, "<", "mahi.txt") or die "Unable to open mahi.txt: $!"; while (<FILE>) { chomp; print "Looking up PART_NUMBER: >$_<\n"; $sth->execute($_) or die "execute failed: ".$sth->errstr; my ($dup) = $sth->fetchrow_array(); print " Query returned: >$dup<\n"; if ($dup eq $_) { print " PART_NUMBER $_ is present\n"; } else { print " Failed to locate PART_NUMBER >$_<\n"; } }
If you run this script perhaps it will tell you more about what is failing.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://698067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found