in reply to no database driver specified and DBI_DSN env var not set at
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: no database driver specified and DBI_DSN env var not set at
by Anonymous Monk on Aug 08, 2007 at 14:38 UTC | |
by Corion (Patriarch) on Aug 08, 2007 at 14:46 UTC | |
by Anonymous Monk on Aug 08, 2007 at 14:54 UTC |