in reply to Re^2: Oracle 10g Database Connection Trouble
in thread Oracle 10g Database Connection Trouble

I'm in!!! Many thanks to all who helped with notable Perl wisdom. My root problem is what I call a Dhf (Dave head failure) (special case of uhf, user head failure). In my haste, I was mixing languages by trying to use || which is the string concatenation operator in PL/SQL. Duh! Also, I had not realized that DBI could make use of my existing Oracle tnsnames.ora file. That makes things much much simpler (and isolated from changes that are occasionally made to that file)! Wow, I'm elated about that.

Once I got that all straightened out (much simpler), it turns out that I don't even need to specifically tell it to use lib 'c:/Perl/lib/DBI' either.

I'll say a novena for everyone. Blessings on you all!

The code that now works looks like this:
use DBI; my $dbh; my $dbConnectString = 'dbi:Oracle:ABCD'; # Connect to the ABCD databas +e specified in tnsnames.ora my $dbUser = 'myUsername'; my $dbPwd = 'myPassword'; # Establish the Oracle database connections and initialize the databas +e statement handle used later unless ($dbh = DBI->connect($dbConnectString, $dbUser, $dbPwd, {RaiseE +rror => 0, AutoCommit => 0 })) { die "Unable to connect to Oracle database ABCD as user $dbUser: $DBI +::errstr: $!"; } $dbh->{RaiseError} = 1; # So we don't have to check every DBI call we +set RaiseError. print "Connected\n"; $dbh->disconnect; undef $dbh;