Active state Perl 5.6.0 (build 623)on NT 4
Oracle 8.1.5
Installed the Active state perl, DBI, DBD using ppm.
I'm able to connect to database using sqlplus but not using the perl scripts.
There was previous install of 8.0.5 on this machine, and installed the new 8.1.5 after
removing 8.0.5 including all entries in registry manually as per the oracle install
notes.
The path defined in environment is
Path=D:\opt\Oracle\product\8.1.5\client\bin;
Any suggestion?
Error looks like...
---------------------------------------------
Can't Connect to the database:
ORA-00000: normal, successful completion (DBD: login failed, check your confi
e.g. ORACLE_HOME/bin on your PATH etc)
Can't call method "prepare" on an undefined value at file6.pl line 18.
---------------------------------------------
the program looks like
---------------------------------------------
#!C:\COREUTIL\perl\bin\perl
use CGI qw(:standard);
use DBI;
use strict;
my $dbName = "DBI:Oracle:CSPEP201.na.xxx.com";
my $dbUserName = "teamsite";
my $dbPassword = "iwuser";
my ($sql,$dbh,$dataObject);
$dbh = DBI->connect($dbName, $dbUserName, $dbPassword,
{
PrintError =>0,
RaiseError =>0
}) or print "Can't Connect to the database:\n $DBI::errstr\n";
$sql = "select * from CUSTOMER_GROUP";
$dataObject = $dbh->prepare($sql) or print " $DBI::errstr SQL Error";
$dataObject->execute() or print "Error Message: Requested table(s) might not exist
$DBI::errstr\n";
while (my @result_set=$dataObject->fetchrow_array)
{
print "@result_set\n";
}