I went through and looked for $dbh->err and $dbh->errstr and
also did a trace. The err and errstr came up undef. Trace showed no obvious
errors. My next step was to take out everything except fot the USE
statements at the top and a print "foo\n" at the end.
#!/usr/bin/perl -w
use strict;
use DBI;
use DBD::Oracle qw(:ora_types);
use Data::Dumper;
print "foo\n";
This when run throught the Java script ( I posted earlier ) it
returned 2. That came from the Java WaitFor() routine which returns 0 for
success or the system errno if it fails.
Next I tried this.
commented out the use DBD::Oracle qw(:ora_types);
#!/usr/bin/perl -w
use strict;
use DBI;
###use DBD::Oracle qw(:ora_types);
use Data::Dumper;
print "foo\n";
this when run throught the Java returned "foo".
I am thinking that this problem that I am running into may be a SCO
Unixware 7.1.1 (or others) issue with DBD::Oracle. I do not have access to
another Oracle instalation on any other platform machine with perl on it to
try to duplicate this issue. Since calling DBD::Oracle I get the system
error of 2 and also when I do a connect which in turn calls DBD::Oracle I
get the same error.
Adam
> -----Original Message-----
> From: Tim Bunce [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, July 02, 2002 12:50 PM
> To: Ronald J Kimball
> Cc: Hapworth, Adam; Job Miller; [EMAIL PROTECTED]
> Subject: Re: Getting a non fatal error after Connect to Oracle
>
> On Tue, Jul 02, 2002 at 09:09:36AM -0400, Ronald J Kimball wrote:
> > On Tue, Jul 02, 2002 at 08:50:02AM -0400, Hapworth, Adam wrote:
> > >
> > > I found that were were previously set but I set them in the script
> according
> > > to the DBD::Oracle docs. Here is a trimed down script and then the
> output I
> > > am receiving.
> > > NOTE: I receive a "No such file or directory" for :0 and :1 if I do
> not
> > > include the "use Data::Dumper;" line. I am still not sure why.
> >
> > `perldoc perlvar`
> >
> > $! If used in a numeric context, yields the current
> > value of errno, with all the usual caveats. (This
> > means that you shouldn't depend on the value of $!
> > to be anything in particular unless you've gotten
> > a specific error return indicating a system
> > error.) If used in a string context, yields the
> > corresponding system error string.
> >
> > Note the parenthetical.
> >
> > >
> > > #!/usr/bin/perl5 -w
> > > print $?."0\n";
> > > print $!.":0\n";
> > >
> > > [snip code containing further invalid uses of $!]
> >
> > Don't print $! unless you've actually gotten a system error, such as
> from
> > open().
>
> Spot on. $! is not set in any meaningful way by DBD::Oracle. Don't use it.
>
> Adam, read the DBI docs about how to detect and handle errors.
> Also read up about trace() you'll find it helpful.
> You may also find it helpful to give more than 8 bytes of space
> for bind_param_inout() so there's more than enough for the date to
> be returned into. 8 is possibly too small. Be generous, the only
> cost is memory and I'm sure you could spare tens times that amount :)
>
> Tim.