FAQ

Hernan Arredondo wrote:

Hi all, I'm new in DBI and I'm really stuck, some can explain me this
code:

use DBI;

my $dbh = DBI->connect( 'dbi:Oracle:db',
'$username',
'$passwd',
) or die "$DBI::errstr";
EOF
Aside from the SID issue, you have single quotes around $username and
$passwd, which means you are passing those literal strings as the username
and password, rather than the contents of the variables. You don't need
quotes at all around individual variables:

my $dbh = DBI->connect( 'dbi:Oracle:db',
$username,
$passwd,
) or die $DBI::errstr;

(with the correct SID still needing to be inserted)


Ronald

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 5 | next ›
Discussion Overview
groupdbi-users @
categoriesperl
postedJan 13, '05 at 7:11p
activeJan 13, '05 at 7:50p
posts5
users4
websitedbi.perl.org

People

Translate

site design / logo © 2022 Grokbase