Jonathan has asked for the wisdom of the Perl Monks concerning the following question:

This script runs fine on Solaris...
#!/usr/local/bin/perl use warnings; use strict; use DBI; my $dbh = DBI->connect("DBI:Oracle:"."a_database", "a_user", "a_password", {AutoCommit => 1, PrintError => 0, RaiseError => 0 }) or die "Couldn't connect to a_database: " . $DBI::errstr; my $res = $dbh->selectall_arrayref("select 1 from dualXXX"); unless ($DBI::err == 0) { print "SQL Failed: ${DBI::err}\n${DBI::errstr}\n"; } else { print "Successful\n"; } $dbh->disconnect();
and as expected returns
SQL Failed: 942 ORA-00942: table or view does not exist (DBD ERROR: OCIStmtExecute/Des +cribe)
However, running the same script on the WinXP cmd shell the script bombs with one of those annoying Windows popups about telling microsoft the problem.

How can I trap my SQL failure in WinXP? I've tried using eval but that makes no difference.

Update 1

I downloaded the DBI and the Oracle DBD from here following their instructions and used their DBI version instead of the ActiveState one but still no joy.

Update 2

Finally got it working.

As above the ActiveState DBI package is not compatible with the Oracle DBD build but by stumbling around in my usual chaotic manner I chanced upon the combo of DBI and DBD versions that work.

Apologies for wasting everyones time.