There is a difference between the strings
and'"dbi:Oracle:host=localhost;sid=nms"'
"dbi:Oracle:host=localhost;sid=nms"
Print them both out to see it. You want the latter.
Where did you pick up the following code to build your DSN and connect to the DB? It's wrong:
# totally wrong code my $dsn = "@array[0], '@array[1]', '@array[2]'"; my $dbh = DBI->connect($dsn);
You don't want to pass a single string to DBI->connect, and the string you used is so horribly wrong in many ways it makes my head hurt. Try print $dsn; to see what $dsn contains. You want the following instead:
my $dbh = DBI->connect(@array);
... and you sure want a better name than @array for the connect parameters. Like, @connect_parameters, for example.
In reply to Re: no database driver specified and DBI_DSN env var not set at
by Corion
in thread no database driver specified and DBI_DSN env var not set at
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |