Hello all,
I used DBI module to connect to oracle in Perl.But yet I'm getting the following error. I am able to use PL/SQL and connect to the sales database without any error.
==========================================================
DBI connect('sales','scott',...) failed: ORA-12705: invalid or unknown NLS parameter value specified (DBD ERROR: OCISessionBegin) at C:\Perl\Examples\select.pl
line 5
===========================================================
#!C:\perl\bin
use strict;
use DBI;
my $dbh= DBI ->connect ('DBI:Oracle:sales','scott','tiger',
{
RaiseError => 1,
AutoCommit => 0
})
|| die ("\nCann't connect to oracle $DBI::errstr"); #Connect to oracle
#create table
my $sql = qq{select EID,ENAME from emp1};
print "SQL is : $sql \n";
my $sth = $dbh->prepare( $sql );
$sth->execute();
my( $eid, $ename );
$sth->bind_columns( undef, \$eid, \$ename);
while( $sth->fetch() ) {
print "$eid ,$ename\n";
}
$sth->finish();
$dbh->disconnect();
Thanks in advance.
I used DBI module to connect to oracle in Perl.But yet I'm getting the following error. I am able to use PL/SQL and connect to the sales database without any error.
==========================================================
DBI connect('sales','scott',...) failed: ORA-12705: invalid or unknown NLS parameter value specified (DBD ERROR: OCISessionBegin) at C:\Perl\Examples\select.pl
line 5
===========================================================
#!C:\perl\bin
use strict;
use DBI;
my $dbh= DBI ->connect ('DBI:Oracle:sales','scott','tiger',
{
RaiseError => 1,
AutoCommit => 0
})
|| die ("\nCann't connect to oracle $DBI::errstr"); #Connect to oracle
#create table
my $sql = qq{select EID,ENAME from emp1};
print "SQL is : $sql \n";
my $sth = $dbh->prepare( $sql );
$sth->execute();
my( $eid, $ename );
$sth->bind_columns( undef, \$eid, \$ename);
while( $sth->fetch() ) {
print "$eid ,$ename\n";
}
$sth->finish();
$dbh->disconnect();
Thanks in advance.