Subject: | $Oraperl::ora_errno doesn't work properly |
#!/usr/bin/perl -w
use strict;
use Oraperl;
my $lda = ora_login( "mydb", "myuser", "mypass" ) or die $Oraperl::ora_errstr;
my $csr;
my $stm;
my $stm_ok = "select sysdate from dual";
my $stm_nok = "select blah from dual";
$stm = $stm_ok;
$csr = ora_open( $lda, $stm );
print "ora_errno= '$ora_errno', '$stm'\n";
$stm = $stm_nok;
$csr = ora_open( $lda, $stm );
print "ora_errno= '$ora_errno', '$stm'\n";
$stm = $stm_ok;
$csr = ora_open( $lda, $stm );
print "ora_errno= '$ora_errno', '$stm'\n";
__END__
yields:
ora_errno= '', 'select sysdate from dual'
ora_errno= '904', 'select blah from dual'
ora_errno= '904', 'select sysdate from dual'
using DBD::Oracle and connect(), prepare, $DBI::err everything works fine
Perl 5.8.0, DBI 1.38